Update cruise.py

This commit is contained in:
infiniteCable
2025-04-26 19:34:54 +02:00
committed by GitHub
parent 450b75bc3c
commit e1e4b04c45
+4 -3
View File
@@ -71,10 +71,11 @@ class VCruiseHelper:
return
speed_limit = CS.cruiseState.speedLimit * CV.MS_TO_KPH
if speed_limit != self.v_speed_limit_kph and speed_limit != 0:
if speed_limit != self.v_speed_limit_kph:
if speed_limit != 0
self.v_cruise_kph = speed_limit
self.v_cruise_kph = np.clip(round(self.v_cruise_kph, 1), V_CRUISE_MIN, V_CRUISE_MAX)
self.v_speed_limit_kph = speed_limit
self.v_cruise_kph = speed_limit
self.v_cruise_kph = np.clip(round(self.v_cruise_kph, 1), V_CRUISE_MIN, V_CRUISE_MAX)
def _update_v_cruise_non_pcm(self, CS, enabled, is_metric):
# handle button presses. TODO: this should be in state_control, but a decelCruise press