mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-04 22:15:42 +08:00
@@ -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()
|
||||
self.slc = SpeedLimitController(CP)
|
||||
|
||||
@property
|
||||
def mlsim(self) -> bool:
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
"""
|
||||
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
|
||||
|
||||
@@ -35,8 +29,9 @@ class SpeedLimitController:
|
||||
_a_ego: float
|
||||
_v_offset: float
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, CP):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user