fixes
This commit is contained in:
parent
46916ce781
commit
0155be7ccd
@ -17,7 +17,7 @@ class Chaser:
|
||||
|
||||
def __init__(self):
|
||||
"""Initialize to state IDLE."""
|
||||
self.current_state = self.State.IDLE
|
||||
self.current_state = self.State.CHASING
|
||||
self.current_led = 0
|
||||
self.chaser_sequence = [
|
||||
0, # First display top segment
|
||||
|
||||
@ -54,21 +54,21 @@ class TimedRelays:
|
||||
next_state = self.State.RELAY_0_HIGH
|
||||
elif hardware.get_button_1():
|
||||
next_state = self.State.BUTTON_1_PRESSED
|
||||
elif self.time_in_current_state > 1:
|
||||
elif self.time_in_current_state > 0.1:
|
||||
next_state = self.State.RELAY_1_LOW
|
||||
case self.State.RELAY_1_LOW:
|
||||
if hardware.get_button_0():
|
||||
next_state = self.State.RELAY_0_HIGH
|
||||
elif hardware.get_button_1():
|
||||
next_state = self.State.BUTTON_1_PRESSED
|
||||
elif self.time_in_current_state > 1:
|
||||
elif self.time_in_current_state > 0.1:
|
||||
next_state = self.State.RELAY_1_HIGH_2
|
||||
case self.State.RELAY_1_HIGH_2:
|
||||
if hardware.get_button_0():
|
||||
next_state = self.State.RELAY_0_HIGH
|
||||
elif hardware.get_button_1():
|
||||
next_state = self.State.BUTTON_1_PRESSED
|
||||
elif self.time_in_current_state > 1:
|
||||
elif self.time_in_current_state > 0.1:
|
||||
next_state = self.State.RELAY_0_LOW
|
||||
|
||||
# Time calculation
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user