Skip to content

Commit

Permalink
revert exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Aug 23, 2022
1 parent 62a811a commit 7e2f390
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions selfdrive/car/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,18 @@ def setUpClass(cls):
car_fw = []
can_msgs = []
fingerprint = defaultdict(dict)
CP = None
for msg in lr:
if msg.which() == "can":
for m in msg.can:
if m.src < 64:
fingerprint[m.src][m.address] = len(m.dat)
can_msgs.append(msg)
elif msg.which() == "carParams":
CP = msg.carParams
car_fw = CP.carFw
if CP.openpilotLongitudinalControl:
car_fw = msg.carParams.carFw
if msg.carParams.openpilotLongitudinalControl:
disable_radar = True
if cls.car_model is None and not cls.ci:
cls.car_model = CP.carFingerprint
cls.car_model = msg.carParams.carFingerprint

if len(can_msgs) > int(50 / DT_CTRL):
break
Expand All @@ -106,11 +104,6 @@ def setUpClass(cls):

cls.can_msgs = sorted(can_msgs, key=lambda msg: msg.logMonoTime)

# Sets enableDsu for cars with missing carFw
# TODO: get new route for TOYOTA.LEXUS_CTH
if len(car_fw) == 0 and CP is not None and CP.enableDsu:
car_fw = [car.CarParams.CarFw(ecu=car.CarParams.Ecu.unknown)]

cls.CarInterface, cls.CarController, cls.CarState = interfaces[cls.car_model]
cls.CP = cls.CarInterface.get_params(cls.car_model, fingerprint, car_fw, disable_radar)
assert cls.CP
Expand Down

0 comments on commit 7e2f390

Please sign in to comment.