Mercurial > code > home > repos > homeauto
changeset 40:62b3bb861e35
rename
Ignore-this: 1e379baf7a8a5ae7cf361bd7c6228d7d
author | drewp@bigasterisk.com |
---|---|
date | Sat, 25 Aug 2012 14:23:32 -0700 |
parents | 5907efb334b0 |
children | 75e3812e712b |
files | service/garageArduino/garage/garage.pde service/garageArduino/garageArduino.py |
diffstat | 2 files changed, 4 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/service/garageArduino/garage/garage.pde Sat Aug 25 14:22:50 2012 -0700 +++ b/service/garageArduino/garage/garage.pde Sat Aug 25 14:23:32 2012 -0700 @@ -147,11 +147,6 @@ one byte for the string length, then a buffer to be shifted out to all the shiftbrites */ - /* - for (int i=0; i < arg / 4; i++) { - setCurrent(127, 127, 127); - } - */ for (int i=0; i<arg; i++) { while (Serial.available() == 0) NULL; SHIFT(Serial.read());
--- a/service/garageArduino/garageArduino.py Sat Aug 25 14:22:50 2012 -0700 +++ b/service/garageArduino/garageArduino.py Sat Aug 25 14:23:32 2012 -0700 @@ -70,13 +70,13 @@ """ shift out this sequence of (r,g,b) triples of 10-bit ints """ - current = "".join(bitstring.pack("0b01, uint:10, uint:10, uint:10", - 127, 127, 127).bytes - for loop in range(len(colors))) + resetCurrent = "".join(bitstring.pack("0b01, uint:10, uint:10, uint:10", + 127, 127, 127).bytes + for loop in range(len(colors))) out = "".join(bitstring.pack("0b00, uint:10, uint:10, uint:10", b, r, g).bytes for r,g,b in colors) - out = current + out + out = resetCurrent + out self.ser.write("\x60\x06" + chr(len(out)) + out) msg = self.ser.readJson() assert msg == {"ok":1}, msg