Skip to content

Commit

Permalink
Update radar_interface.py
Browse files Browse the repository at this point in the history
added acadia info
  • Loading branch information
CryptoKylan authored Aug 28, 2018
1 parent 33a9a0c commit 8cfb5e3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions selfdrive/car/gm/radar_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ def create_radard_can_parser(canbus, car_fingerprint):

checks = []

return CANParser(dbc_f, signals, checks, canbus.obstacle)

if car_fingerprint == CAR.ACADIA_DENALI:

This comment has been minimized.

Copy link
@rbiasini

rbiasini Aug 28, 2018

Contributor

@CryptoKylan , why duplicating the code?
if car_fingerprint is in [CAR.VOLT, CAR.ACADIA_DENALI] should be ok, right?

# C1A-ARS3-A by Continental
radar_targets = range(SLOT_1_MSG, SLOT_1_MSG + NUM_SLOTS)
signals = zip(['LRRNumObjects'] +
['TrkRange'] * NUM_SLOTS + ['TrkRangeRate'] * NUM_SLOTS +
['TrkRangeAccel'] * NUM_SLOTS + ['TrkAzimuth'] * NUM_SLOTS +
['TrkWidth'] * NUM_SLOTS + ['TrkObjectID'] * NUM_SLOTS,
[NUM_TARGETS_MSG] + radar_targets * 6,
[0] + [0.0] * NUM_SLOTS + [0.0] * NUM_SLOTS +
[0.0] * NUM_SLOTS + [0.0] * NUM_SLOTS +
[0.0] * NUM_SLOTS + [0] * NUM_SLOTS)

checks = []

return CANParser(dbc_f, signals, checks, canbus.obstacle)
else:
return None
Expand Down

0 comments on commit 8cfb5e3

Please sign in to comment.