Compare commits

...

3 Commits

Author SHA1 Message Date
Jason Wen
1dc0a3f10b GM: remove CHEVROLET_EQUINOX_NON_ACC_3RD_GEN from dashcamOnly 2026-02-16 02:45:56 -05:00
Jason Wen
6ad719796c fix race condition 2026-02-16 02:06:26 -05:00
Jason Wen
8b1093adf0 ICBM: ensure button timers update on disable to clear stale presses 2026-02-13 00:20:04 -05:00
2 changed files with 6 additions and 3 deletions

View File

@@ -48,14 +48,14 @@ class VCruiseHelper(VCruiseHelperSP):
self.get_minimum_set_speed(is_metric)
_enabled = self.update_enabled_state(CS, enabled)
if CS.cruiseState.available:
_enabled = self.update_enabled_state(CS, enabled)
if not self.CP.pcmCruise or (not self.CP_SP.pcmCruiseSpeed and _enabled):
# if stock cruise is completely disabled, then we can use our own set speed logic
self._update_v_cruise_non_pcm(CS, _enabled, is_metric)
self.update_speed_limit_assist_v_cruise_non_pcm()
self.v_cruise_cluster_kph = self.v_cruise_kph
self.update_button_timers(CS, enabled)
else:
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
self.v_cruise_cluster_kph = CS.cruiseState.speedCluster * CV.MS_TO_KPH
@@ -69,6 +69,9 @@ class VCruiseHelper(VCruiseHelperSP):
self.v_cruise_kph = V_CRUISE_UNSET
self.v_cruise_cluster_kph = V_CRUISE_UNSET
if not self.CP.pcmCruise or not self.CP_SP.pcmCruiseSpeed:
self.update_button_timers(CS, enabled)
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
# would have the effect of both enabling and changing speed is checked after the state transition