diff --git a/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py b/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py index 97dac727c1..aa30e12f6b 100644 --- a/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py +++ b/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py @@ -21,7 +21,7 @@ class LongitudinalPlannerSP: self.dec = DynamicExperimentalController(CP, mpc) self.generation = int(model_bundle.generation) if (model_bundle := get_active_bundle()) else None - self.slc = SpeedLimitController(CP) + self.slc = SpeedLimitController() @property def mlsim(self) -> bool: diff --git a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_controller.py b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_controller.py index 41a06c5719..aa8000c385 100644 --- a/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_controller.py +++ b/sunnypilot/selfdrive/controls/lib/speed_limit_controller/speed_limit_controller.py @@ -1,3 +1,9 @@ +""" +Copyright (c) 2021-, Haibin Wen, sunnypilot, and a number of other contributors. + +This file is part of sunnypilot and is licensed under the MIT License. +See the LICENSE.md file in the root directory for more details. +""" import numpy as np import time @@ -29,9 +35,8 @@ class SpeedLimitController: _a_ego: float _v_offset: float - def __init__(self, CP): + def __init__(self): self.params = Params() - self.CP = CP self.policy = self.params.get("SpeedLimitControlPolicy", return_default=True) self.resolver = SpeedLimitResolver(self.policy) self.last_params_update = 0.0