mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-19 19:23:58 +08:00
Honda Bosch: switch ACC_HUD between metric/imperial (#22428)
* Honda Bosch: switch ACC_HUD between metric/imperial * bump opendbc
This commit is contained in:
2
opendbc
2
opendbc
Submodule opendbc updated: 1bf5b62008...8ca52eb1f8
@@ -80,9 +80,11 @@ def get_can_signals(CP, gearbox_msg, main_on_sig_msg):
|
||||
if CP.carFingerprint in HONDA_BOSCH:
|
||||
signals += [
|
||||
("EPB_STATE", "EPB_STATUS", 0),
|
||||
("IMPERIAL_UNIT", "CAR_SPEED", 1),
|
||||
]
|
||||
checks += [
|
||||
("EPB_STATUS", 50),
|
||||
("CAR_SPEED", 10),
|
||||
]
|
||||
|
||||
if not CP.openpilotLongitudinalControl:
|
||||
@@ -291,7 +293,12 @@ class CarState(CarStateBase):
|
||||
ret.brakePressed = True
|
||||
|
||||
# TODO: discover the CAN msg that has the imperial unit bit for all other cars
|
||||
self.is_metric = not cp.vl["HUD_SETTING"]["IMPERIAL_UNIT"] if self.CP.carFingerprint in (CAR.CIVIC) else False
|
||||
if self.CP.carFingerprint in (CAR.CIVIC, ):
|
||||
self.is_metric = not cp.vl["HUD_SETTING"]["IMPERIAL_UNIT"]
|
||||
elif self.CP.carFingerprint in HONDA_BOSCH:
|
||||
self.is_metric = not cp.vl["CAR_SPEED"]["IMPERIAL_UNIT"]
|
||||
else:
|
||||
self.is_metric = False
|
||||
|
||||
if self.CP.carFingerprint in HONDA_BOSCH:
|
||||
ret.stockAeb = (not self.CP.openpilotLongitudinalControl) and bool(cp.vl["ACC_CONTROL"]["AEB_STATUS"] and cp.vl["ACC_CONTROL"]["ACCEL_COMMAND"] < -1e-5)
|
||||
|
||||
Reference in New Issue
Block a user