From 9171ce79ca9149fa2fe832cfaed0eed8c37c1e1d Mon Sep 17 00:00:00 2001 From: Lukas <61192133+lukasloetkolben@users.noreply.github.com> Date: Mon, 5 May 2025 20:35:02 +0200 Subject: [PATCH] Rivian dbc update (#2187) DBC adjustments --- opendbc/car/rivian/riviancan.py | 5 ++--- opendbc/dbc/rivian_park_assist_can.dbc | 9 ++++++--- opendbc/dbc/rivian_primary_actuator.dbc | 13 ++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/opendbc/car/rivian/riviancan.py b/opendbc/car/rivian/riviancan.py index f22b5917..d51b15c9 100644 --- a/opendbc/car/rivian/riviancan.py +++ b/opendbc/car/rivian/riviancan.py @@ -66,10 +66,9 @@ def create_longitudinal(packer, frame, accel, enabled): values = { "ACM_longitudinalRequest_Counter": frame % 15, "ACM_AccelerationRequest": accel if enabled else 0, - "ACM_VehicleHoldRequired": 0, - "ACM_PrndRequired": 0, + "ACM_PrndRequest": 0, "ACM_longInterfaceEnable": 1 if enabled else 0, - "ACM_AccelerationRequestType": 0, + "ACM_VehicleHoldRequest": 0, } data = packer.make_can_msg("ACM_longitudinalRequest", 0, values)[1] diff --git a/opendbc/dbc/rivian_park_assist_can.dbc b/opendbc/dbc/rivian_park_assist_can.dbc index 1d595512..b18f0a53 100644 --- a/opendbc/dbc/rivian_park_assist_can.dbc +++ b/opendbc/dbc/rivian_park_assist_can.dbc @@ -39,7 +39,7 @@ BO_ 794 WheelButtons: 7 XXX SG_ LeftButton_ScrollClick : 19|2@0+ (1,0) [0|3] "" XXX SG_ LeftButton_RightClick : 21|2@0+ (1,0) [0|3] "" XXX SG_ LeftButton_LeftClick : 22|2@1+ (1,0) [0|3] "" XXX - SG_ LeftBUtton_Scroll : 31|8@0+ (1,0) [0|255] "" XXX + SG_ LeftButton_Scroll : 31|8@0+ (1,0) [0|255] "" XXX SG_ RightButton_ScrollClick : 35|2@0+ (1,0) [0|3] "" XXX SG_ RightButton_RightClick : 37|2@0+ (1,0) [0|3] "" XXX SG_ RightButton_LeftClick : 38|2@1+ (1,0) [0|3] "" XXX @@ -48,5 +48,8 @@ BO_ 794 WheelButtons: 7 XXX BO_ 848 BSM_BlindSpotIndicator: 4 XXX SG_ BSM_BlindSpotIndicator_Checksum : 0|8@1+ (1,0) [0|255] "" XXX SG_ BSM_BlindSpotIndicator_Counter : 11|4@0+ (1,0) [0|15] "" XXX - SG_ BSM_BlindSpotIndicator_Left : 28|1@0+ (1,0) [0|1] "" XXX - SG_ BSM_BlindSpotIndicator_Right : 30|1@0+ (1,0) [0|1] "" XXX \ No newline at end of file + SG_ BSM_BlindSpotIndicator_Left : 29|2@0+ (1,0) [0|3] "" XXX + SG_ BSM_BlindSpotIndicator_Right : 30|2@1+ (1,0) [0|3] "" XXX + +VAL_ 848 BSM_BlindSpotIndicator_Left 0 "OFF" 1 "OBJECT_DETECTED" 2 "ACTIVE_WARNING" ; +VAL_ 848 BSM_BlindSpotIndicator_Right 0 "OFF" 1 "OBJECT_DETECTED" 2 "ACTIVE_WARNING" ; \ No newline at end of file diff --git a/opendbc/dbc/rivian_primary_actuator.dbc b/opendbc/dbc/rivian_primary_actuator.dbc index af048923..fb25e871 100644 --- a/opendbc/dbc/rivian_primary_actuator.dbc +++ b/opendbc/dbc/rivian_primary_actuator.dbc @@ -175,10 +175,9 @@ BO_ 352 ACM_longitudinalRequest: 5 ACM SG_ ACM_longitudinalRequest_Checksum : 7|8@0+ (1,0) [0|255] "-" VDM SG_ ACM_longitudinalRequest_Counter : 11|4@0+ (1,0) [0|15] "-" VDM SG_ ACM_AccelerationRequest : 23|11@0+ (0.01,-10.24) [-10.24|10.23] "m/s^2" VDM - SG_ ACM_VehicleHoldRequired : 24|1@0+ (1,0) [0|1] "" VDM - SG_ ACM_PrndRequired : 27|3@0+ (1,0) [0|7] "" VDM + SG_ ACM_PrndRequest : 27|4@0+ (1,0) [0|7] "" VDM SG_ ACM_longInterfaceEnable : 37|2@0+ (1,0) [0|3] "" VDM - SG_ ACM_AccelerationRequestType : 39|2@0+ (1,0) [0|3] "" VDM + SG_ ACM_VehicleHoldRequest : 39|2@0+ (1,0) [0|3] "" VDM BO_ 354 VDM_AdasSts: 8 VDM SG_ VDM_AdasStatus_Checksum : 7|8@0+ (1,0) [0|0] "" ACM @@ -609,9 +608,9 @@ CM_ SG_ 352 ACM_longitudinalRequest_Checksum "Checksum signal for frame"; CM_ SG_ 352 ACM_longitudinalRequest_Counter "Message counter signal for frame"; CM_ SG_ 352 ACM_AccelerationRequest "Acceleration Request command from the ACM"; CM_ SG_ 352 ACM_VehicleHoldRequired "Vehicle hold request flag"; -CM_ SG_ 352 ACM_PrndRequired "Drive state Request command from the ACM"; +CM_ SG_ 352 ACM_PrndRequest "Gear state Request command from the ACM"; CM_ SG_ 352 ACM_longInterfaceEnable "Acceleration Interface Enable Request from the ACM"; -CM_ SG_ 352 ACM_AccelerationRequestType "Acceleration Request type(positive/negative) from the ACM"; +CM_ SG_ 352 ACM_VehicleHoldRequest "Vehicle hold request from ACM"; CM_ SG_ 354 VDM_AdasStatus_Checksum "VDM_AdasSts message j1850 checksum."; CM_ SG_ 354 VDM_AdasStatus_Counter "VDM_AdasSts message counter."; CM_ SG_ 354 VDM_AdasFaultStatus "Fault status of ADAS requests from VDM."; @@ -872,9 +871,9 @@ VAL_ 338 VDM_EspPartialModeRequest 0 "VDM_EspPartialModeRequest_Normal" 1 "VDM_E VAL_ 338 VDM_SteeringModeRequest 0 "VDM_SteeringModeRequest_Default" 1 "VDM_SteeringModeRequest_Normal" 2 "VDM_SteeringModeRequest_Sport" 3 "VDM_SteeringModeRequest_Comfort"; VAL_ 338 VDM_EpasPowerMode 0 "VDM_EpasPowerMode_Drive_Off" 1 "VDM_EpasPowerMode_Drive_On" 2 "VDM_EpasPowerMode_Shutdown"; VAL_ 352 ACM_VehicleHoldRequired 0 "ACM_VEHICLEHOLDREQ_NO_REQUEST" 1 "ACM_VEHICLEHOLDREQ_VEHICLE_HOLD_REQUEST"; -VAL_ 352 ACM_PrndRequired 0 "ACM_PRNDREQ_PARK" 1 "ACM_PRNDREQ_REVERSE" 2 "ACM_PRNDREQ_NEUTRAL" 3 "ACM_PRNDREQ_DRIVE" 4 "ACM_PRNDREQ_NOT_USED"; +VAL_ 352 ACM_PrndRequest 0 "ACM_PRNDREQ_NO_REQUEST" 1 "ACM_PRNDREQ_PARK" 2 "ACM_PRNDREQ_REVERSE" 3 "ACM_PRNDREQ_NEUTRAL" 4 "ACM_PRNDREQ_DRIVE"; VAL_ 352 ACM_longInterfaceEnable 0 "ACM_LONGIFEN_INIT" 1 "ACM_LONGIFEN_LONGITUDINAL_INTERFACE_ENABLE" 2 "ACM_LONGIFEN_LONGITUDINAL_INTERFACE_DISABLE" 3 "ACM_LONGIFEN_SNA"; -VAL_ 352 ACM_AccelerationRequestType 0 "ACM_ACCELREQTYPE_INIT" 1 "ACM_ACCELREQTYPE_ACCEL_NEGATIVE" 2 "ACM_ACCELREQTYPE_ACCEL_POSITIVE" 3 "ACM_ACCELREQTYPE_SNA"; +VAL_ 352 ACM_VehicleHoldRequest 0 "NO_REQUEST" 1 "HOLD_REQUEST"; VAL_ 354 VDM_AdasDriverAccelPriorityStatus 0 "VDM_AdasDriverAccelPriorityStatus_Driver" 1 "VDM_AdasDriverAccelPriorityStatus_Adas"; VAL_ 354 VDM_AdasFaultStatus 0 "VDM_AdasFlaultStatus_No_Fault" 1 "VDM_AdasFaultStatus_Brk_Intv" 2 "VDM_AdasFlaultStatus_Cntr_Fault" 3 "VDM_AdasFlaultStatus_Imps_Cmd" 15 "VDM_AdasFlaultStatus_Sna"; VAL_ 354 VDM_AdasDriverModeStatus 0 "VDM_AdasDriverModeStatus_Human" 1 "VDM_AdasDriverModeStatus_Adas" 2 "VDM_AdasDriverModeStatus_Reserved" 3 "VDM_AdasDriverModeStatus_Sna";