Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions opendbc/honda_clarity_hybrid_2018_can_generated.dbc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ BO_ 388 BRAKE_ERROR: 8 XXX
SG_ COUNTER : 61|2@0+ (1,0) [0|3] "" EON
SG_ CHECKSUM : 59|4@0+ (1,0) [0|3] "" EON

BO_ 547 BRAKE_HOLD: 6 XXX
SG_ BRAKE_HOLD_FAULT_BIT : 33|1@0+ (1,0) [0|1] "" XXX
SG_ BRAKE_HOLD_ENABLED : 37|2@0+ (1,0) [0|7] "" XXX
SG_ BRAKE_HOLD_ACTIVE : 38|1@0+ (1,0) [0|1] "" XXX
SG_ CHECKSUM : 43|4@0+ (1,0) [0|15] "" XXX
SG_ COUNTER : 45|2@0+ (1,0) [0|3] "" XXX

BO_ 399 STEER_STATUS: 7 EPS
SG_ STEER_TORQUE_SENSOR : 7|16@0- (-1,0) [-31000|31000] "tbd" EON
SG_ STEER_ANGLE_RATE : 23|16@0- (-0.1,0) [-31000|31000] "deg/s" EON
Expand Down
6 changes: 5 additions & 1 deletion selfdrive/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def get_can_messages(CP, gearbox_msg):
messages.append(("CRUISE_FAULT_STATUS", 50))
elif CP.carFingerprint == CAR.HONDA_CLARITY:
messages.append(("BRAKE_ERROR", 100)),
messages.append(("BRAKE_HOLD", 25)),
elif CP.openpilotLongitudinalControl:
messages.append(("STANDSTILL", 50))

Expand Down Expand Up @@ -189,7 +190,10 @@ def update(self, cp, cp_cam, cp_body, frogpilot_toggles):

ret.leftBlinker, ret.rightBlinker = self.update_blinker_from_stalk(
250, cp.vl["SCM_FEEDBACK"]["LEFT_BLINKER"], cp.vl["SCM_FEEDBACK"]["RIGHT_BLINKER"])
ret.brakeHoldActive = cp.vl["VSA_STATUS"]["BRAKE_HOLD_ACTIVE"] == 1
if self.CP.carFingerprint == CAR.HONDA_CLARITY and not self.CP.enableGasInterceptor:
ret.brakeHoldActive = cp.vl["BRAKE_HOLD"]["BRAKE_HOLD_ACTIVE"] == 1
else:
ret.brakeHoldActive = cp.vl["VSA_STATUS"]["BRAKE_HOLD_ACTIVE"] == 1

# TODO: set for all cars
if self.CP.carFingerprint in (HONDA_BOSCH | {CAR.HONDA_CIVIC, CAR.HONDA_CLARITY, CAR.HONDA_ODYSSEY, CAR.HONDA_ODYSSEY_CHN}):
Expand Down