Skip to content

Commit 2816b16

Browse files
switch to ESP_Vehicle_Speed
1 parent 4678bec commit 2816b16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

opendbc/car/rivian/carstate.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def update(self, can_parsers) -> structs.CarState:
2020
ret = structs.CarState()
2121

2222
# Vehicle speed
23-
ret.vEgoRaw = cp.vl["ESPiB1"]["ESPiB1_VehicleSpeed"]
23+
ret.vEgoRaw = cp.vl["ESP_Status"]["ESP_Vehicle_Speed"] * CV.KPH_TO_MS
2424
ret.vEgo, ret.aEgo = self.update_speed_kf(ret.vEgoRaw)
25-
ret.standstill = (ret.vEgo < 0.1)
25+
ret.standstill = abs(ret.vEgoRaw) < 0.01
2626

2727
# Gas pedal
2828
pedal_status = cp.vl["VDM_PropStatus"]["VDM_AcceleratorPedalPosition"]
@@ -78,7 +78,7 @@ def update(self, can_parsers) -> structs.CarState:
7878
def get_can_parsers(CP):
7979
pt_messages = [
8080
# sig_address, frequency
81-
("ESPiB1", 50),
81+
("ESP_Status", 50),
8282
("VDM_PropStatus", 50),
8383
("iBESP2", 50),
8484
("EPAS_AdasStatus", 100),

0 commit comments

Comments
 (0)