From fc4b12c05ca74c7d3f1e3db852b4fef4572a8840 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Sun, 24 Oct 2021 21:59:50 -0700 Subject: [PATCH] sim: set fingerprint with environment variable (#22679) old-commit-hash: e556d3d3d3bf6a0cdc588abbae57b256aace0351 --- tools/sim/launch_openpilot.sh | 1 + tools/sim/lib/can.py | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/sim/launch_openpilot.sh b/tools/sim/launch_openpilot.sh index f433ae26d9..7ee9a65148 100755 --- a/tools/sim/launch_openpilot.sh +++ b/tools/sim/launch_openpilot.sh @@ -3,6 +3,7 @@ export PASSIVE="0" export NOBOARD="1" export SIMULATION="1" +export FINGERPRINT="HONDA CIVIC 2016" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" cd ../../selfdrive/manager && ./manager.py diff --git a/tools/sim/lib/can.py b/tools/sim/lib/can.py index 96fd786337..333445985c 100755 --- a/tools/sim/lib/can.py +++ b/tools/sim/lib/can.py @@ -3,7 +3,6 @@ import cereal.messaging as messaging from opendbc.can.packer import CANPacker from opendbc.can.parser import CANParser from selfdrive.boardd.boardd_api_impl import can_list_to_can_capnp # pylint: disable=no-name-in-module,import-error -from selfdrive.car.honda.values import FINGERPRINTS, CAR from selfdrive.car import crc8_pedal packer = CANPacker("honda_civic_touring_2016_can_generated") @@ -75,12 +74,6 @@ def can_function(pm, speed, angle, idx, cruise_button, is_engaged): for i in range(16): msg.append(rpacker.make_can_msg("TRACK_%d" % i, 1, {"LONG_DIST": 255.5}, -1)) - # fill in the rest for fingerprint - done = set([x[0] for x in msg]) - for k, v in FINGERPRINTS[CAR.CIVIC][0].items(): - if k not in done and k not in [0xE4, 0x194]: - msg.append([k, 0, b'\x00'*v, 0]) - pm.send('can', can_list_to_can_capnp(msg)) def sendcan_function(sendcan):