diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index e8cd95f3..cc77b1d3 100755 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -201,7 +201,8 @@ class Controls: if self.can_rcv_error or (not CS.canValid and self.sm.frame > 5 / DT_CTRL): self.events.add(EventName.canError) - if self.mismatch_counter >= 200: + if (self.sm['health'].safetyModel != self.CP.safetyModel and self.sm.frame > 2 / DT_CTRL) or \ + self.mismatch_counter >= 200: self.events.add(EventName.controlsMismatch) if not self.sm.alive['plan'] and self.sm.alive['pathPlan']: # only plan not being received: radar not communicating diff --git a/selfdrive/test/longitudinal_maneuvers/plant.py b/selfdrive/test/longitudinal_maneuvers/plant.py index eba0933c..3295342e 100755 --- a/selfdrive/test/longitudinal_maneuvers/plant.py +++ b/selfdrive/test/longitudinal_maneuvers/plant.py @@ -8,6 +8,7 @@ import numpy as np from opendbc import DBC_PATH +from cereal import car from common.realtime import Ratekeeper from selfdrive.config import Conversions as CV import cereal.messaging as messaging @@ -375,6 +376,7 @@ class Plant(): Plant.driverState.send(driver_state.to_bytes()) health = messaging.new_message('health') + health.health.safetyModel = car.CarParams.SafetyModel.hondaNidec health.health.controlsAllowed = True Plant.health.send(health.to_bytes()) diff --git a/selfdrive/test/process_replay/ref_commit b/selfdrive/test/process_replay/ref_commit index 08669043..6d230075 100644 --- a/selfdrive/test/process_replay/ref_commit +++ b/selfdrive/test/process_replay/ref_commit @@ -1 +1 @@ -f863303a303348b27d624a1e301857ec0b432e17 +635052c6f021001fd11ec68ad0f6ee1811ee4a76 \ No newline at end of file diff --git a/selfdrive/test/process_replay/test_processes.py b/selfdrive/test/process_replay/test_processes.py index ac0fdae8..9d0abce0 100755 --- a/selfdrive/test/process_replay/test_processes.py +++ b/selfdrive/test/process_replay/test_processes.py @@ -13,17 +13,19 @@ INJECT_MODEL = 0 segments = [ ("HONDA", "d83f36766f8012a5|2020-02-05--18-42-21--2"), # HONDA.CIVIC_BOSCH_DIESEL (BOSCH) - ("HONDA", "99c94dc769b5d96e|2019-08-03--14-19-59--2"), # HONDA.CIVIC (NIDEC) + ("HONDA", "a74b011b32b51b56|2020-07-26--17-09-36--6"), # HONDA.CIVIC (NIDEC) ("TOYOTA", "77611a1fac303767|2020-02-29--13-29-33--3"), # TOYOTA.COROLLA_TSS2 ("TOYOTA", "b14c5b4742e6fc85|2020-10-14--11-04-47--4"), # TOYOTA.RAV4 (LQR) ("TOYOTA", "0982d79ebb0de295|2020-10-18--19-11-36--5"), # TOYOTA.PRIUS (INDI) - ("GM", "7cc2a8365b4dd8a9|2018-12-02--12-10-44--2"), # GM.ACADIA ("CHRYSLER", "b6849f5cf2c926b1|2020-02-28--07-29-48--13"), # CHRYSLER.PACIFICA ("HYUNDAI", "5b7c365c50084530|2020-04-15--16-13-24--3"), # HYUNDAI.SONATA - ("SUBARU", "7873afaf022d36e2|2019-07-03--18-46-44--0"), # SUBARU.IMPREZA + ("SUBARU", "c321c6b697c5a5ff|2020-06-23--11-04-33--12"), # SUBARU.FORESTER ("VOLKSWAGEN", "76b83eb0245de90e|2020-03-05--19-16-05--3"), # VW.GOLF ("NISSAN", "fbbfa6af821552b9|2020-03-03--08-09-43--0"), # NISSAN.XTRAIL + # TODO: update this route + ("GM", "7cc2a8365b4dd8a9|2018-12-02--12-10-44--2"), # GM.ACADIA + # Enable when port is tested and dascamOnly is no longer set #("MAZDA", "32a319f057902bb3|2020-04-27--15-18-58--2"), # MAZDA.CX5 ]