Controls - Quality of Life - Set Speed Offset
Set an offset for your desired set speed. Co-Authored-By: Tim Wilson <7284371+twilsonco@users.noreply.github.com>
This commit is contained in:
parent
bee2a5524c
commit
00199defe8
@ -112,6 +112,11 @@ class VCruiseHelper:
|
|||||||
else:
|
else:
|
||||||
self.v_cruise_kph += v_cruise_delta * CRUISE_INTERVAL_SIGN[button_type]
|
self.v_cruise_kph += v_cruise_delta * CRUISE_INTERVAL_SIGN[button_type]
|
||||||
|
|
||||||
|
v_cruise_offset = (frogpilot_variables.set_speed_offset * CRUISE_INTERVAL_SIGN[button_type]) if long_press else 0
|
||||||
|
if v_cruise_offset < 0:
|
||||||
|
v_cruise_offset = frogpilot_variables.set_speed_offset - v_cruise_delta
|
||||||
|
self.v_cruise_kph += v_cruise_offset
|
||||||
|
|
||||||
# If set is pressed while overriding, clip cruise speed to minimum of vEgo
|
# If set is pressed while overriding, clip cruise speed to minimum of vEgo
|
||||||
if CS.gasPressed and button_type in (ButtonType.decelCruise, ButtonType.setCruise):
|
if CS.gasPressed and button_type in (ButtonType.decelCruise, ButtonType.setCruise):
|
||||||
self.v_cruise_kph = max(self.v_cruise_kph, CS.vEgo * CV.MS_TO_KPH)
|
self.v_cruise_kph = max(self.v_cruise_kph, CS.vEgo * CV.MS_TO_KPH)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user