From f34d61b9bda5cc7da4edbea17555e062b4a9501f Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 15 Sep 2024 02:47:05 -0400 Subject: [PATCH] todo for future investigation, default for now --- .../lib/custom_stock_longitudinal_controller/states.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sunnypilot/controls/lib/custom_stock_longitudinal_controller/states.py b/sunnypilot/controls/lib/custom_stock_longitudinal_controller/states.py index e6c8c148bb..a1feba748b 100644 --- a/sunnypilot/controls/lib/custom_stock_longitudinal_controller/states.py +++ b/sunnypilot/controls/lib/custom_stock_longitudinal_controller/states.py @@ -23,8 +23,10 @@ class ButtonStateBase(ABC): def __call__(self) -> int | None: if self.controller.is_ready: - hold_time_offset = HOLD_TIME_METRIC if self.car_state.params_list.is_metric else HOLD_TIME_IMPERIAL - self.hold_time = randint(self.hold_time_custom + hold_time_offset[0], self.hold_time_custom + hold_time_offset[1]) + # TODO-SP: Validate different intervals for different platforms to prevent temporary cruise fault + self.hold_time = HOLD_TIME + #hold_time_offset = HOLD_TIME_METRIC if self.car_state.params_list.is_metric else HOLD_TIME_IMPERIAL + #self.hold_time = randint(self.hold_time_custom + hold_time_offset[0], self.hold_time_custom + hold_time_offset[1]) else: if self.controller.is_ready_prev: self.controller.button_state = ButtonControlState.inactive