mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 06:22:06 +08:00
controlsd: no cruise speed while main off (#24052)
* controlsd: no cruise speed while main off * probably more accurate * update refs
This commit is contained in:
@@ -403,8 +403,11 @@ class Controls:
|
||||
# if stock cruise is completely disabled, then we can use our own set speed logic
|
||||
if not self.CP.pcmCruise:
|
||||
self.v_cruise_kph = update_v_cruise(self.v_cruise_kph, CS.buttonEvents, self.button_timers, self.enabled, self.is_metric)
|
||||
elif CS.cruiseState.enabled:
|
||||
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
|
||||
else:
|
||||
if CS.cruiseState.available:
|
||||
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
|
||||
else:
|
||||
self.v_cruise_kph = 0
|
||||
|
||||
# decrement the soft disable timer at every step, as it's reset on
|
||||
# entrance in SOFT_DISABLING state
|
||||
|
||||
@@ -1 +1 @@
|
||||
81ec7708ef7582ab950f9af4810d403fce292eb1
|
||||
98d82b2da600755b12e9ecb2744bf4a8b0942ca1
|
||||
Reference in New Issue
Block a user