From 7887a156cb581fc809988f1fcece1ed38b2259b6 Mon Sep 17 00:00:00 2001 From: mawei Date: Wed, 19 Jun 2024 10:09:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20selfdrive/car/honda/carsta?= =?UTF-8?q?te.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- selfdrive/car/honda/carstate.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index 18c6b1d..d8951b9 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -42,7 +42,7 @@ def get_can_messages(CP, gearbox_msg): if CP.carFingerprint in (CAR.CRV_HYBRID, CAR.CIVIC_BOSCH_DIESEL, CAR.ACURA_RDX_3G, CAR.HONDA_E): messages.append((gearbox_msg, 50)) else: - messages.append((gearbox_msg, 100)) + pass#messages.append((gearbox_msg, 100)) if CP.carFingerprint in HONDA_BOSCH_ALT_BRAKE_SIGNAL: messages.append(("BRAKE_MODULE", 50)) @@ -58,10 +58,10 @@ def get_can_messages(CP, gearbox_msg): ("ACC_CONTROL", 50), ] else: # Nidec signals - if CP.carFingerprint == CAR.ODYSSEY_CHN: - messages.append(("CRUISE_PARAMS", 10)) - else: - messages.append(("CRUISE_PARAMS", 50)) + pass#if CP.carFingerprint == CAR.ODYSSEY_CHN: + #messages.append(("CRUISE_PARAMS", 10)) + #else: + #messages.append(("CRUISE_PARAMS", 50)) # TODO: clean this up if CP.carFingerprint in (CAR.ACCORD, CAR.ACCORDH, CAR.CIVIC_BOSCH, CAR.CIVIC_BOSCH_DIESEL, CAR.CRV_HYBRID, CAR.INSIGHT, @@ -90,15 +90,15 @@ class CarState(CarStateBase): def __init__(self, CP): super().__init__(CP) can_define = CANDefine(DBC[CP.carFingerprint]["pt"]) - self.gearbox_msg = "GEARBOX" - if CP.carFingerprint == CAR.ACCORD and CP.transmissionType == TransmissionType.cvt: - self.gearbox_msg = "GEARBOX_15T" + #self.gearbox_msg = "GEARBOX" + #if CP.carFingerprint == CAR.ACCORD and CP.transmissionType == TransmissionType.cvt: + #self.gearbox_msg = "GEARBOX_15T" self.main_on_sig_msg = "SCM_FEEDBACK" if CP.carFingerprint in HONDA_NIDEC_ALT_SCM_MESSAGES: self.main_on_sig_msg = "SCM_BUTTONS" - self.shifter_values = can_define.dv[self.gearbox_msg]["GEAR_SHIFTER"] + #self.shifter_values = can_define.dv[self.gearbox_msg]["GEAR_SHIFTER"] self.steer_status_values = defaultdict(lambda: "UNKNOWN", can_define.dv["STEER_STATUS"]["STEER_STATUS"]) self.brake_switch_prev = False @@ -192,7 +192,7 @@ class CarState(CarStateBase): if self.CP.carFingerprint in (HONDA_BOSCH | {CAR.CIVIC, CAR.ODYSSEY, CAR.ODYSSEY_CHN, CAR.CLARITY}): ret.parkingBrake = cp.vl["EPB_STATUS"]["EPB_STATE"] != 0 - gear = int(cp.vl[self.gearbox_msg]["GEAR_SHIFTER"]) + #gear = int(cp.vl[self.gearbox_msg]["GEAR_SHIFTER"]) ret.gearShifter = self.parse_gear_shifter(self.shifter_values.get(gear, None)) if self.CP.enableGasInterceptor: @@ -296,9 +296,9 @@ class CarState(CarStateBase): return ret - def get_can_parser(self, CP): - messages = get_can_messages(CP, self.gearbox_msg) - return CANParser(DBC[CP.carFingerprint]["pt"], messages, get_pt_bus(CP.carFingerprint)) + #def get_can_parser(self, CP): + #messages = get_can_messages(CP, self.gearbox_msg) + #return CANParser(DBC[CP.carFingerprint]["pt"], messages, get_pt_bus(CP.carFingerprint)) @staticmethod def get_cam_can_parser(CP):