not needed here

pull/30653/head
Shane Smiskol 1 year ago
parent 6123b7dba3
commit fea258fd14
  1. 5
      selfdrive/controls/tests/test_state_machine.py

@ -1,17 +1,15 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import unittest import unittest
from unittest import mock
from cereal import car, log from cereal import car, log
from openpilot.common.realtime import DT_CTRL from openpilot.common.realtime import DT_CTRL
from openpilot.selfdrive.car.car_helpers import interfaces from openpilot.selfdrive.car.car_helpers import interfaces
from openpilot.selfdrive.controls.controlsd import Controls, SOFT_DISABLE_TIME from openpilot.selfdrive.controls.controlsd import Controls, SOFT_DISABLE_TIME
from openpilot.selfdrive.controls.lib.events import Events, ET, Alert, Priority, AlertSize, AlertStatus, VisualAlert, \ from openpilot.selfdrive.controls.lib.events import Events, ET, Alert, Priority, AlertSize, AlertStatus, VisualAlert, \
AudibleAlert, EVENTS as _EVENTS AudibleAlert, EVENTS
State = log.ControlsState.OpenpilotState State = log.ControlsState.OpenpilotState
EVENTS = _EVENTS.copy()
# 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.overriding: (ET.OVERRIDE_LATERAL, ET.OVERRIDE_LONGITUDINAL)} State.preEnabled: (ET.PRE_ENABLE,), State.overriding: (ET.OVERRIDE_LATERAL, ET.OVERRIDE_LONGITUDINAL)}
@ -29,7 +27,6 @@ def make_event(event_types):
return 0 return 0
@mock.patch("openpilot.selfdrive.controls.lib.events.EVENTS", EVENTS)
class TestStateMachine(unittest.TestCase): class TestStateMachine(unittest.TestCase):
def setUp(self): def setUp(self):

Loading…
Cancel
Save