Skip to content

Commit

Permalink
and that
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Aug 14, 2024
1 parent 989d898 commit 391445e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions selfdrive/car/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from openpilot.common.basedir import BASEDIR
from openpilot.common.params import Params
from openpilot.selfdrive.car import DT_CTRL, gen_empty_fingerprint
from openpilot.selfdrive.car.structs import CarParams
from openpilot.selfdrive.car import structs
from openpilot.selfdrive.car.fingerprints import all_known_cars, MIGRATION
from openpilot.selfdrive.car.car_helpers import FRAME_FINGERPRINT, interfaces
from openpilot.selfdrive.car.honda.values import CAR as HONDA, HondaFlags
Expand All @@ -32,7 +32,7 @@

EventName = car.CarEvent.EventName
PandaType = log.PandaState.PandaType
SafetyModel = CarParams.SafetyModel
SafetyModel = car.CarParams.SafetyModel

NUM_JOBS = int(os.environ.get("NUM_JOBS", "1"))
JOB_ID = int(os.environ.get("JOB_ID", "0"))
Expand Down Expand Up @@ -204,7 +204,7 @@ def test_car_params(self):
# make sure car params are within a valid range
self.assertGreater(self.CP.mass, 1)

if self.CP.steerControlType != CarParams.SteerControlType.angle:
if self.CP.steerControlType != structs.CarParams.SteerControlType.angle:
tuning = self.CP.lateralTuning.which()
if tuning == 'pid':
self.assertTrue(len(self.CP.lateralTuning.pid.kpV))
Expand All @@ -217,7 +217,7 @@ def test_car_interface(self):
# TODO: also check for checksum violations from can parser
can_invalid_cnt = 0
can_valid = False
CC = car.CarControl.new_message().as_reader()
CC = structs.CarControl()

for i, msg in enumerate(self.can_msgs):
CS = self.CI.update(can_capnp_to_list((msg.as_builder().to_bytes(),)))
Expand Down

0 comments on commit 391445e

Please sign in to comment.