mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-05 08:16:06 +08:00
Honda HR-V: set standstill (#22009)
* fix apparent Honda HR-V bugs
* CarState.standstill was not set
* CarState.gas was not derived from GAS_PEDAL/CAR_GAS
* revert gas change
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 44c546c92a
This commit is contained in:
@@ -163,12 +163,8 @@ def get_can_signals(CP, gearbox_msg="GEARBOX"):
|
||||
("GAS_PEDAL_2", 100),
|
||||
]
|
||||
elif CP.carFingerprint == CAR.HRV:
|
||||
signals += [("CAR_GAS", "GAS_PEDAL", 0),
|
||||
("MAIN_ON", "SCM_BUTTONS", 0),
|
||||
signals += [("MAIN_ON", "SCM_BUTTONS", 0),
|
||||
("BRAKE_HOLD_ACTIVE", "VSA_STATUS", 0)]
|
||||
checks += [
|
||||
("GAS_PEDAL", 100),
|
||||
]
|
||||
elif CP.carFingerprint == CAR.ODYSSEY:
|
||||
signals += [("MAIN_ON", "SCM_FEEDBACK", 0),
|
||||
("EPB_STATE", "EPB_STATUS", 0)]
|
||||
@@ -237,6 +233,7 @@ class CarState(CarStateBase):
|
||||
ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 0.1
|
||||
ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"])
|
||||
elif self.CP.carFingerprint == CAR.HRV:
|
||||
ret.standstill = not cp.vl["STANDSTILL"]["WHEELS_MOVING"]
|
||||
ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"])
|
||||
else:
|
||||
ret.standstill = not cp.vl["STANDSTILL"]["WHEELS_MOVING"]
|
||||
|
||||
Reference in New Issue
Block a user