Honda: resolve controls mismatch due to interceptor thresholds (#24173)

* make panda and openpilot thresholds match

* Revert "make panda and openpilot thresholds match"

This reverts commit dfcbd2058784de809564ada41e4cfbbfca7afe77.

* make panda and openpilot thresholds match

* remove interceptor scaling, compare int value

* remove honda exception

* bump panda

* bump opendbc

* add segment to check controls mismatch

* bump submodules
This commit is contained in:
Shane Smiskol
2022-04-12 11:20:55 -07:00
committed by GitHub
parent 85c714e350
commit e8faf9f985
5 changed files with 8 additions and 6 deletions

Submodule opendbc updated: b928a20513...eb56fff37a

2
panda

Submodule panda updated: cc0fdffee6...c925407461

View File

@@ -239,10 +239,12 @@ class CarState(CarStateBase):
ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(gear, None))
if self.CP.enableGasInterceptor:
ret.gas = (cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) / 2.
# Same threshold as panda, equivalent to 1e-5 with previous DBC scaling
ret.gas = (cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS"] + cp.vl["GAS_SENSOR"]["INTERCEPTOR_GAS2"]) // 2
ret.gasPressed = ret.gas > 492
else:
ret.gas = cp.vl["POWERTRAIN_DATA"]["PEDAL_GAS"]
ret.gasPressed = ret.gas > 1e-5
ret.gasPressed = ret.gas > 1e-5
ret.steeringTorque = cp.vl["STEER_STATUS"]["STEER_TORQUE_SENSOR"]
ret.steeringTorqueEps = cp.vl["STEER_MOTOR_TORQUE"]["MOTOR_TORQUE"]

View File

@@ -45,6 +45,8 @@ routes = [
TestRoute("0e7a2ba168465df5|2020-10-18--14-14-22", HONDA.ACURA_RDX_3G),
TestRoute("a74b011b32b51b56|2020-07-26--17-09-36", HONDA.CIVIC),
# Checks there's no controls mismatches due to pedal thresholds
TestRoute("cfb32f0fb91b173b|2022-04-06--14-54-45", HONDA.CIVIC, segment=21),
TestRoute("a859a044a447c2b0|2020-03-03--18-42-45", HONDA.CRV_EU),
TestRoute("68aac44ad69f838e|2021-05-18--20-40-52", HONDA.CRV),
TestRoute("14fed2e5fa0aa1a5|2021-05-25--14-59-42", HONDA.CRV_HYBRID),

View File

@@ -215,8 +215,6 @@ class TestCarModel(unittest.TestCase):
# panda intentionally has a higher threshold
if self.CP.carName == "toyota" and 15 < CS.gas < 15*1.5:
gas_pressed = False
if self.CP.carName == "honda":
gas_pressed = False
checks['gasPressed'] += gas_pressed != self.safety.get_gas_pressed_prev()
# TODO: remove this exception once this mismatch is resolved