Skip to content

Commit

Permalink
switch to ESP_Vehicle_Speed
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasloetkolben committed Jan 21, 2025
1 parent 4678bec commit 2816b16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opendbc/car/rivian/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def update(self, can_parsers) -> structs.CarState:
ret = structs.CarState()

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

# Gas pedal
pedal_status = cp.vl["VDM_PropStatus"]["VDM_AcceleratorPedalPosition"]
Expand Down Expand Up @@ -78,7 +78,7 @@ def update(self, can_parsers) -> structs.CarState:
def get_can_parsers(CP):
pt_messages = [
# sig_address, frequency
("ESPiB1", 50),
("ESP_Status", 50),
("VDM_PropStatus", 50),
("iBESP2", 50),
("EPAS_AdasStatus", 100),
Expand Down

0 comments on commit 2816b16

Please sign in to comment.