From f2fe63fa5f8d24a1bda50e9159e372a4199010eb Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Fri, 29 Aug 2025 01:03:21 -0400 Subject: [PATCH] use existing --- sunnypilot/selfdrive/controls/lib/longitudinal_planner.py | 1 - .../lib/speed_limit_controller/speed_limit_controller.py | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py b/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py index 6bbd21ae86..97dac727c1 100644 --- a/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py +++ b/sunnypilot/selfdrive/controls/lib/longitudinal_planner.py @@ -7,7 +7,6 @@ See the LICENSE.md file in the root directory for more details. from cereal import messaging, custom from opendbc.car import structs -from openpilot.selfdrive.car.cruise import V_CRUISE_UNSET from openpilot.sunnypilot.selfdrive.controls.lib.dec.dec import DynamicExperimentalController from openpilot.sunnypilot.selfdrive.controls.lib.speed_limit_controller.speed_limit_controller import SpeedLimitController from openpilot.sunnypilot.selfdrive.selfdrived.events import EventsSP 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 235cd97121..3354877466 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 @@ -4,9 +4,10 @@ import time from cereal import messaging, custom from openpilot.common.constants import CV from openpilot.common.params import Params +from openpilot.selfdrive.car.cruise import V_CRUISE_UNSET from openpilot.sunnypilot.selfdrive.controls.lib.speed_limit_controller import LIMIT_PERC_OFFSET_BP, LIMIT_PERC_OFFSET_V, \ PARAMS_UPDATE_PERIOD, LIMIT_SPEED_OFFSET_TH, SpeedLimitControlState, PRE_ACTIVE_GUARD_PERIOD, REQUIRED_INITIAL_CRUISE_SPEED, \ - CRUISE_SPEED_TOLERANCE, FALLBACK_CRUISE_SPEED + CRUISE_SPEED_TOLERANCE from openpilot.selfdrive.controls.lib.drive_helpers import CONTROL_N from openpilot.sunnypilot.selfdrive.controls.lib.speed_limit_controller.common import Source, Policy, Engage, OffsetType from openpilot.sunnypilot.selfdrive.controls.lib.speed_limit_controller.helpers import description_for_state, debug @@ -118,7 +119,7 @@ class SpeedLimitController: return self.last_valid_speed_limit_offsetted # Fallback - return FALLBACK_CRUISE_SPEED + return V_CRUISE_UNSET @property def speed_limit_offset(self) -> float: