Fix bug where state not actually written to pipe every second (from testing)
This commit is contained in:
parent
e56002baf8
commit
93140f53af
5
bmcd
5
bmcd
|
@ -68,12 +68,7 @@ def writestate(is_pled_flashing):
|
||||||
state_prev = 1
|
state_prev = 1
|
||||||
while True:
|
while True:
|
||||||
state_now = GPIO.input(gpio_state)
|
state_now = GPIO.input(gpio_state)
|
||||||
if state_now != state_prev:
|
|
||||||
fstate.write(str(state_now))
|
fstate.write(str(state_now))
|
||||||
state_prev = state_now
|
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
if not is_pled_flashing.isSet():
|
if not is_pled_flashing.isSet():
|
||||||
if state_now == 1:
|
if state_now == 1:
|
||||||
powerled_on()
|
powerled_on()
|
||||||
|
|
Loading…
Reference in New Issue