|
|
@ -12,11 +12,10 @@ State = log.ControlsState.OpenpilotState |
|
|
|
|
|
|
|
|
|
|
|
# The event types that maintain the current state |
|
|
|
# The event types that maintain the current state |
|
|
|
MAINTAIN_STATES = {State.enabled: None, State.disabled: None, State.softDisabling: ET.SOFT_DISABLE, |
|
|
|
MAINTAIN_STATES = {State.enabled: None, State.disabled: None, State.softDisabling: ET.SOFT_DISABLE, |
|
|
|
State.preEnabled: ET.PRE_ENABLE} |
|
|
|
State.preEnabled: ET.PRE_ENABLE, State.overriding: ET.OVERRIDE} |
|
|
|
ALL_STATES = tuple((state for state in State.schema.enumerants.values() if |
|
|
|
ALL_STATES = tuple(State.schema.enumerants.values()) |
|
|
|
state != State.overriding)) # TODO: remove overriding exception |
|
|
|
|
|
|
|
# The event types checked in DISABLED section of state machine |
|
|
|
# The event types checked in DISABLED section of state machine |
|
|
|
ENABLE_EVENT_TYPES = (ET.ENABLE, ET.PRE_ENABLE) |
|
|
|
ENABLE_EVENT_TYPES = (ET.ENABLE, ET.PRE_ENABLE, ET.OVERRIDE) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def make_event(event_types): |
|
|
|
def make_event(event_types): |
|
|
|