mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-26 08:22:05 +08:00
car interfaces: test longitudinal params are set correctly (#26894)
* add long unit tests and fix * revert * remove debug * cleanup Co-authored-by: Laptop Researcher <laptop@researcher.com>
This commit is contained in:
@@ -35,6 +35,12 @@ class TestCarInterfaces(unittest.TestCase):
|
||||
self.assertGreater(car_params.centerToFront, 0)
|
||||
self.assertGreater(car_params.maxLateralAccel, 0)
|
||||
|
||||
# Longitudinal sanity checks
|
||||
self.assertEqual(len(car_params.longitudinalTuning.kpV), len(car_params.longitudinalTuning.kpBP))
|
||||
self.assertEqual(len(car_params.longitudinalTuning.kiV), len(car_params.longitudinalTuning.kiBP))
|
||||
self.assertEqual(len(car_params.longitudinalTuning.deadzoneV), len(car_params.longitudinalTuning.deadzoneBP))
|
||||
|
||||
# Lateral sanity checks
|
||||
if car_params.steerControlType != car.CarParams.SteerControlType.angle:
|
||||
tune = car_params.lateralTuning
|
||||
if tune.which() == 'pid':
|
||||
|
||||
Reference in New Issue
Block a user