mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-07-09 06:52:05 +08:00
test_models: check panda cruise state (#29423)
* cruise state test * add todo * rename * clean up * remove
This commit is contained in:
@@ -344,6 +344,10 @@ class TestCarModelBase(unittest.TestCase):
|
||||
checks['controlsAllowed'] += not self.safety.get_controls_allowed()
|
||||
else:
|
||||
checks['controlsAllowed'] += not CS.cruiseState.enabled and self.safety.get_controls_allowed()
|
||||
|
||||
# TODO: fix notCar mismatch
|
||||
if not self.CP.notCar:
|
||||
checks['cruiseState'] += CS.cruiseState.enabled != self.safety.get_cruise_engaged_prev()
|
||||
else:
|
||||
# Check for enable events on rising edge of controls allowed
|
||||
button_enable = any(evt.enable for evt in CS.events)
|
||||
|
||||
Reference in New Issue
Block a user