Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/arduinoNode.py @ 997:b24885725f59
support for pwm board
Ignore-this: 4bf59699c590c75c79e6ae72d719343a
darcs-hash:20150830081929-312f9-45f7134e807c5de2bb0dad13a5a9d1fa032bf471
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Sun, 30 Aug 2015 01:19:29 -0700 |
parents | f72068e9d9d8 |
children | 9c8674329a13 |
comparison
equal
deleted
inserted
replaced
996:a34e008a8f95 | 997:b24885725f59 |
---|---|
185 gen = '' | 185 gen = '' |
186 else: | 186 else: |
187 raise NotImplementedError | 187 raise NotImplementedError |
188 | 188 |
189 if gen: | 189 if gen: |
190 generated[attr] += '// for %s\n%s\n' % (dev.uri, gen) | 190 generated[attr] += '// for %s\n%s\n' % (dev.uri, gen.strip()) |
191 | 191 |
192 code = ''' | 192 code = ''' |
193 %(includes)s | 193 %(includes)s |
194 | 194 |
195 %(global)s | 195 %(global)s |
204 | 204 |
205 void idle() { | 205 void idle() { |
206 // this slowdown is to spend somewhat less time PWMing, to reduce | 206 // this slowdown is to spend somewhat less time PWMing, to reduce |
207 // leaking from on channels to off ones (my shift register has no | 207 // leaking from on channels to off ones (my shift register has no |
208 // latching) | 208 // latching) |
209 if (micros() < lastFrame + 128) { | 209 if (micros() < lastFrame + 80) { |
210 return; | 210 return; |
211 } | 211 } |
212 lastFrame = micros(); | 212 lastFrame = micros(); |
213 frame++; | 213 frame++; |
214 %(idles)s | 214 %(idles)s |