Skip to content

Commit 35bff67

Browse files
authored
Rivian: add passenger door open signals (#1837)
* new signals * value degs * use
1 parent 09c9b0a commit 35bff67

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

opendbc/car/rivian/carstate.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ def update(self, can_parsers) -> structs.CarState:
5858
ret.gearShifter = GEAR_MAP[int(cp.vl["VDM_PropStatus"]["VDM_Prndl_Status"])]
5959

6060
# Doors
61-
ret.doorOpen = cp.vl["DoorStatus"]["DoorOpen"] == 1
61+
ret.doorOpen = (cp_adas.vl["IndicatorLights"]["RearDriverDoor"] != 2 or
62+
cp_adas.vl["IndicatorLights"]["FrontPassengerDoor"] != 2 or
63+
cp_adas.vl["IndicatorLights"]["DriverDoor"] != 2 or
64+
cp_adas.vl["IndicatorLights"]["RearPassengerDoor"] != 2)
6265

6366
# Blinkers
6467
ret.leftBlinker = cp_adas.vl["IndicatorLights"]["TurnLightLeft"] in (1, 2)
@@ -92,7 +95,6 @@ def get_can_parsers(CP):
9295
("EPAS_SystemStatus", 100),
9396
("RCM_Status", 8),
9497
("VDM_AdasSts", 100),
95-
("DoorStatus", 10),
9698
("SCCM_WheelTouch", 20),
9799
]
98100

opendbc/dbc/rivian_can.dbc

+8
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ BO_ 530 VDM_Torque_Rear: 8 VDM
327327
BO_ 565 IndicatorLights: 8 XXX
328328
SG_ checksum : 0|8@1+ (1,0) [0|255] "" XXX
329329
SG_ counter : 8|4@1+ (1,0) [0|15] "" XXX
330+
SG_ RearDriverDoor : 24|2@0+ (1,0) [0|3] "" XXX
331+
SG_ FrontPassengerDoor : 26|2@0+ (1,0) [0|3] "" XXX
332+
SG_ DriverDoor : 28|2@0+ (1,0) [0|3] "" XXX
333+
SG_ RearPassengerDoor : 38|2@0+ (1,0) [0|3] "" XXX
330334
SG_ TurnLightLeft : 40|2@0+ (1,0) [0|3] "" XXX
331335
SG_ TurnLightRight : 54|2@0+ (1,0) [0|3] "" XXX
332336

@@ -936,6 +940,10 @@ VAL_ 529 VDM_Torque_Front_MinQ 0 "VDM_Torque_Front_MinQ_Invalid" 1 "VDM_Torque_F
936940
VAL_ 530 VDM_Torque_Rear_MaxQ 0 "VDM_Torque_Rear_MaxQ_Invalid" 1 "VDM_Torque_Rear_MaxQ_Valid";
937941
VAL_ 530 VDM_OutputTorqueRearQ 0 "VDM_OutputTorqueRearQ_Invalid" 1 "VDM_OutputTorqueRearQ_Valid";
938942
VAL_ 530 VDM_Torque_Rear_MinQ 0 "VDM_Torque_Rear_MinQ_Invalid" 1 "VDM_Torque_Rear_MinQ_Valid";
943+
VAL_ 565 RearDriverDoor 0 "SNA" 1 "Open" 2 "Closed" 3 "SNA";
944+
VAL_ 565 FrontPassengerDoor 0 "SNA" 1 "Open" 2 "Closed" 3 "SNA";
945+
VAL_ 565 DriverDoor 0 "SNA" 1 "Open" 2 "Closed" 3 "SNA";
946+
VAL_ 565 RearPassengerDoor 0 "SNA" 1 "Open" 2 "Closed" 3 "SNA";
939947
VAL_ 811 ESP_EpbAvailable 0 "ESP_EpbAvailable_Not_Available" 1 "ESP_EpbAvailable_Available";
940948
VAL_ 811 ESP_EpbServiceMode 0 "ESP_EpbServiceMode_Not_Active" 1 "ESP_EpbServiceMode_Active";
941949
VAL_ 811 ESP_EpbWarningLamp 0 "ESP_EpbWarningLamp_Off" 1 "ESP_EpbWarningLamp_Continous" 2 "ESP_EpbWarningLamp_Blink" 3 "ESP_EpbWarningLamp_Sna";

0 commit comments

Comments
 (0)