fix bug for green light not turning off
This commit is contained in:
parent
4ff1d4a574
commit
24683e6507
@ -97,6 +97,9 @@ while True:
|
|||||||
|
|
||||||
time.sleep(.5)
|
time.sleep(.5)
|
||||||
|
|
||||||
|
# Turn green off, if on. It should only be on for one cycle
|
||||||
|
setColor('green', False)
|
||||||
|
|
||||||
for c, v in colors.items():
|
for c, v in colors.items():
|
||||||
if c == 'green':
|
if c == 'green':
|
||||||
continue
|
continue
|
||||||
@ -108,7 +111,7 @@ while True:
|
|||||||
if v['prev'] > Counter(d[c])['active'] and v['steady']:
|
if v['prev'] > Counter(d[c])['active'] and v['steady']:
|
||||||
setColor('green', True)
|
setColor('green', True)
|
||||||
|
|
||||||
v['prev'] = Counter(d[c])['active']
|
colors[c]['prev'] = Counter(d[c])['active']
|
||||||
|
|
||||||
print(time.time() - start)
|
print(time.time() - start)
|
||||||
print('---')
|
print('---')
|
||||||
|
Loading…
Reference in New Issue
Block a user