mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
test car models: only check cruise state on PCM cruise cars
old-commit-hash: 2723cc6cf8c6481a510c9347ef0526b53f679e43
This commit is contained in:
@@ -178,7 +178,8 @@ class TestCarModel(unittest.TestCase):
|
||||
# check that openpilot and panda safety agree on the car's state
|
||||
checks['gasPressed'] += CS.gasPressed != safety.get_gas_pressed_prev()
|
||||
checks['brakePressed'] += CS.brakePressed != safety.get_brake_pressed_prev()
|
||||
checks['controlsAllowed'] += not CS.cruiseState.enabled and safety.get_controls_allowed()
|
||||
if self.CP.pcmCruise:
|
||||
checks['controlsAllowed'] += not CS.cruiseState.enabled and safety.get_controls_allowed()
|
||||
|
||||
# TODO: reduce tolerance to 0
|
||||
failed_checks = {k: v for k, v in checks.items() if v > 25}
|
||||
|
||||
Reference in New Issue
Block a user