Skip to content

Commit

Permalink
Fix indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Oct 30, 2024
1 parent bf74f17 commit 0446c05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opendbc/car/ford/radar_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _update_delphi_mrr(self):
# Indexes 0 and 2 have a max range of ~40m, 1 and 3 are ~170m (MRR_Header_SensorCoverage->CAN_RANGE_COVERAGE)
# Indexes 0 and 1 have a Doppler coverage of +-71 m/s, 2 and 3 have +-60 m/s
scanIndex = msg[f"CAN_SCAN_INDEX_2LSB_{ii:02d}"]
i = (ii - 1) * 2 + scanIndex
i = (ii - 1) * 2 + (scanIndex - 2)

# Throw out old measurements. Very unlikely to happen, but is proper behavior
if scanIndex != headerScanIndex:
Expand Down

0 comments on commit 0446c05

Please sign in to comment.