From 9b76c108c654e497fff7f10052c1932872a6e104 Mon Sep 17 00:00:00 2001 From: loveloveses <52433822+loveloveses@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:00:52 +0800 Subject: [PATCH 1/3] enableBsm for CRV HYBRID enableBsm for CRV HYBRID --- selfdrive/car/honda/carstate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py index b0b6273329328a..430be2467b9911 100644 --- a/selfdrive/car/honda/carstate.py +++ b/selfdrive/car/honda/carstate.py @@ -385,7 +385,7 @@ def update(self, cp, cp_cam, cp_body): self.stock_hud = cp_cam.vl["ACC_HUD"] self.stock_brake = cp_cam.vl["BRAKE_COMMAND"] - if self.CP.enableBsm and self.CP.carFingerprint in (CAR.CRV_5G, ): + if self.CP.enableBsm and self.CP.carFingerprint in (CAR.CRV_5G, CAR.CRV_HYBRID,): # BSM messages are on B-CAN, requires a panda forwarding B-CAN messages to CAN 0 # more info here: https://github.com/commaai/openpilot/pull/1867 ret.leftBlindspot = cp_body.vl["BSM_STATUS_LEFT"]["BSM_ALERT"] == 1 @@ -425,7 +425,7 @@ def get_cam_can_parser(CP): @staticmethod def get_body_can_parser(CP): - if CP.enableBsm and CP.carFingerprint == CAR.CRV_5G: + if CP.enableBsm and CP.carFingerprint in (CAR.CRV_5G, CAR.CRV_HYBRID,): signals = [("BSM_ALERT", "BSM_STATUS_RIGHT", 0), ("BSM_ALERT", "BSM_STATUS_LEFT", 0)] From a85f8d141eb9afefc3ca9bda8f82cca101bd4a91 Mon Sep 17 00:00:00 2001 From: loveloveses <52433822+loveloveses@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:05:54 +0800 Subject: [PATCH 2/3] enable bsm for CRV HYBRID --- selfdrive/car/honda/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index da08b1a44942bc..37cdc433de6a0d 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -134,7 +134,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), car_fw=[]): # py ret.enableGasInterceptor = 0x201 in fingerprint[0] ret.openpilotLongitudinalControl = ret.enableCamera - if candidate == CAR.CRV_5G: + if candidate in (CAR.CRV_5G, CAR.CRV_HYBRID,): ret.enableBsm = 0x12f8bfa7 in fingerprint[0] # Accord 1.5T CVT has different gearbox message From 76c77a1fb9d2731fbceb9aa9ef53417f493a7c7f Mon Sep 17 00:00:00 2001 From: loveloveses <52433822+loveloveses@users.noreply.github.com> Date: Fri, 13 Aug 2021 12:08:23 +0800 Subject: [PATCH 3/3] enable bsm for CRV HYBRID --- selfdrive/car/honda/values.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/car/honda/values.py b/selfdrive/car/honda/values.py index 2c0109464f3354..59752083258f2a 100644 --- a/selfdrive/car/honda/values.py +++ b/selfdrive/car/honda/values.py @@ -1245,7 +1245,7 @@ class CAR: CAR.CRV: dbc_dict('honda_crv_touring_2016_can_generated', 'acura_ilx_2016_nidec'), CAR.CRV_5G: dbc_dict('honda_crv_ex_2017_can_generated', None, body_dbc='honda_crv_ex_2017_body_generated'), CAR.CRV_EU: dbc_dict('honda_crv_executive_2016_can_generated', 'acura_ilx_2016_nidec'), - CAR.CRV_HYBRID: dbc_dict('honda_crv_hybrid_2019_can_generated', None), + CAR.CRV_HYBRID: dbc_dict('honda_crv_hybrid_2019_can_generated', None, body_dbc='honda_crv_ex_2017_body_generated'), CAR.FIT: dbc_dict('honda_fit_ex_2018_can_generated', 'acura_ilx_2016_nidec'), CAR.HRV: dbc_dict('honda_hrv_touring_2019_can_generated', 'acura_ilx_2016_nidec'), CAR.ODYSSEY: dbc_dict('honda_odyssey_exl_2018_generated', 'acura_ilx_2016_nidec'),