Skip to content

Commit

Permalink
add full state in forced_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtazy committed Dec 10, 2023
1 parent 51d9a11 commit de55f62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Binary file modified doc/soft_solat_state_machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions soft_solar_router/application/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ class SolarRouterStateMachine(StateMachine):
event_no_importing = sunny_off.to(sunny_on)

event_start_forced = idle.to(forced_on)
event_stop_forced = forced_on.to(idle)
event_stop_forced = forced_on.to(idle) | full.to(idle)

event_not_enought_consumption_when_switch_on = sunny_on.to(full)
event_not_enought_consumption_when_switch_on = sunny_on.to(full) | forced_on.to(
full
)

def __init__(self):
self.expected_switch_state = False
Expand Down

0 comments on commit de55f62

Please sign in to comment.