fix.. decelCruise button at cruise activated.
This commit is contained in:
parent
9a1692569e
commit
cda0faa3d6
@ -442,6 +442,8 @@ class VCruiseCarrot:
|
|||||||
|
|
||||||
v_cruise_kph, button_type, long_pressed = self._carrot_command(v_cruise_kph, button_type, long_pressed)
|
v_cruise_kph, button_type, long_pressed = self._carrot_command(v_cruise_kph, button_type, long_pressed)
|
||||||
|
|
||||||
|
cruise_activated = not self.enabled_last and CC.enabled
|
||||||
|
|
||||||
if button_type in [ButtonType.accelCruise, ButtonType.decelCruise]:
|
if button_type in [ButtonType.accelCruise, ButtonType.decelCruise]:
|
||||||
if self.autoCruiseControl_cancel_timer > 0:
|
if self.autoCruiseControl_cancel_timer > 0:
|
||||||
self._add_log(f"AutoCruiseControl cancel timer RESET {button_type}")
|
self._add_log(f"AutoCruiseControl cancel timer RESET {button_type}")
|
||||||
@ -469,6 +471,8 @@ class VCruiseCarrot:
|
|||||||
self._pause_auto_speed_up = True
|
self._pause_auto_speed_up = True
|
||||||
if self._soft_hold_active > 0:
|
if self._soft_hold_active > 0:
|
||||||
self._cruise_control(-1, -1, "Cruise off,softhold mode (decelCruise)")
|
self._cruise_control(-1, -1, "Cruise off,softhold mode (decelCruise)")
|
||||||
|
elif cruise_activated:
|
||||||
|
v_cruise_kph = self.v_ego_kph_set
|
||||||
elif self._cruise_button_mode in [0, 1]:
|
elif self._cruise_button_mode in [0, 1]:
|
||||||
v_cruise_kph = button_kph
|
v_cruise_kph = button_kph
|
||||||
elif self.v_ego_kph_set > self._cruise_speed_min and v_cruise_kph > self.v_ego_kph_set:
|
elif self.v_ego_kph_set > self._cruise_speed_min and v_cruise_kph > self.v_ego_kph_set:
|
||||||
@ -501,6 +505,8 @@ class VCruiseCarrot:
|
|||||||
v_cruise_kph = button_kph
|
v_cruise_kph = button_kph
|
||||||
self._v_cruise_kph_at_brake = 0
|
self._v_cruise_kph_at_brake = 0
|
||||||
elif button_type == ButtonType.decelCruise:
|
elif button_type == ButtonType.decelCruise:
|
||||||
|
if cruise_activated:
|
||||||
|
v_cruise_kph = self.v_ego_kph_set
|
||||||
self._pause_auto_speed_up = True
|
self._pause_auto_speed_up = True
|
||||||
v_cruise_kph = button_kph
|
v_cruise_kph = button_kph
|
||||||
self._v_cruise_kph_at_brake = 0
|
self._v_cruise_kph_at_brake = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user