Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/arduinoNode.py @ 335:3010238b94a0
rgb strip animation support in arduinoNode
Ignore-this: 5f50c7b54ce1588243735c43d2cbea0f
author | drewp@bigasterisk.com |
---|---|
date | Sat, 03 Mar 2018 17:55:37 -0800 |
parents | bb80182195c0 |
children | 13b2a61650c1 |
comparison
equal
deleted
inserted
replaced
334:bb80182195c0 | 335:3010238b94a0 |
---|---|
198 raise | 198 raise |
199 #plus statements about succeeding or erroring on the last poll | 199 #plus statements about succeeding or erroring on the last poll |
200 byte = self.ser.read(1) | 200 byte = self.ser.read(1) |
201 if byte != 'x': | 201 if byte != 'x': |
202 raise ValueError("after poll, got %x instead of 'x'" % byte) | 202 raise ValueError("after poll, got %x instead of 'x'" % byte) |
203 for i in self._devs: | |
204 if i.wantIdleOutput(): | |
205 self.ser.write("\x60" + chr(self._devCommandNum[i.uri])) | |
206 i.outputIdle(self.ser.write) | |
207 if self.ser.read(1) != 'k': | |
208 raise ValueError('no ack after outputIdle') | |
203 elapsed = time.time() - t1 | 209 elapsed = time.time() - t1 |
204 if elapsed > 1.0: | 210 if elapsed > 1.0: |
205 log.warn('poll took %.1f seconds' % elapsed) | 211 log.warn('poll took %.1f seconds' % elapsed) |
206 | 212 |
207 stmts = set() | 213 stmts = set() |