Skip to content

Commit

Permalink
verify the door ajar stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
csouers committed Oct 2, 2024
1 parent 3f82d2f commit c49830b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions opendbc/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ def update(self, cp, cp_cam, _, cp_body, __) -> structs.CarState:
# panda checks if the signal is non-zero
ret.standstill = cp.vl["ENGINE_DATA"]["XMISSION_SPEED"] < 1e-5
# TODO: find a common signal across all cars
# TODO: verify odyssey_bosch
if self.CP.carFingerprint in (CAR.HONDA_ACCORD, CAR.HONDA_CIVIC_BOSCH, CAR.HONDA_CIVIC_BOSCH_DIESEL, CAR.HONDA_CRV_HYBRID, CAR.HONDA_INSIGHT,
CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_CIVIC_2022, CAR.HONDA_HRV_3G, CAR.HONDA_ODYSSEY_BOSCH):
CAR.ACURA_RDX_3G, CAR.HONDA_E, CAR.HONDA_CIVIC_2022, CAR.HONDA_HRV_3G):
ret.doorOpen = bool(cp.vl["SCM_FEEDBACK"]["DRIVERS_DOOR_OPEN"])
elif self.CP.carFingerprint in (CAR.HONDA_ODYSSEY_CHN, CAR.HONDA_FREED, CAR.HONDA_HRV):
ret.doorOpen = bool(cp.vl["SCM_BUTTONS"]["DRIVERS_DOOR_OPEN"])
Expand All @@ -145,7 +144,6 @@ def update(self, cp, cp_cam, _, cp_body, __) -> structs.CarState:
cp.vl["DOORS_STATUS"]["DOOR_OPEN_RL"], cp.vl["DOORS_STATUS"]["DOOR_OPEN_RR"]])
ret.seatbeltUnlatched = bool(cp.vl["SEATBELT_STATUS"]["SEATBELT_DRIVER_LAMP"] or not cp.vl["SEATBELT_STATUS"]["SEATBELT_DRIVER_LATCHED"])

# TODO: same on all cars, right?
# Triggered by STEER_TORQUE_REQUEST in CAN frame STEERING_CONTROL
self.steer_on = bool(cp.vl["STEER_STATUS"]["STEER_CONTROL_ACTIVE"])
steer_status = self.steer_status_values[cp.vl["STEER_STATUS"]["STEER_STATUS"]]
Expand Down

0 comments on commit c49830b

Please sign in to comment.