mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-28 20:33:51 +08:00
Volt: Don't adjust speed on resume from stopped (#325)
* Don't adjust speed if resuming * Detab
This commit is contained in:
@@ -194,7 +194,8 @@ class CarInterface(object):
|
||||
|
||||
# cruise state
|
||||
ret.cruiseState.available = bool(self.CS.main_on)
|
||||
ret.cruiseState.enabled = self.CS.pcm_acc_status != 0
|
||||
cruiseEnabled = self.CS.pcm_acc_status != 0
|
||||
ret.cruiseState.enabled = cruiseEnabled
|
||||
ret.cruiseState.standstill = self.CS.pcm_acc_status == 4
|
||||
|
||||
ret.leftBlinker = self.CS.left_blinker_on
|
||||
@@ -228,7 +229,8 @@ class CarInterface(object):
|
||||
be.pressed = False
|
||||
but = self.CS.prev_cruise_buttons
|
||||
if but == CruiseButtons.RES_ACCEL:
|
||||
be.type = 'accelCruise'
|
||||
if not (cruiseEnabled and self.CS.standstill):
|
||||
be.type = 'accelCruise' # Suppress resume button if we're resuming from stop so we don't adjust speed.
|
||||
elif but == CruiseButtons.DECEL_SET:
|
||||
be.type = 'decelCruise'
|
||||
elif but == CruiseButtons.CANCEL:
|
||||
|
||||
Reference in New Issue
Block a user