Volt: Don't adjust speed on resume from stopped (#325)

* Don't adjust speed if resuming

* Detab
pull/331/merge
Jamezz 7 years ago committed by rbiasini
parent ed72759a48
commit c29b311583
  1. 6
      selfdrive/car/gm/interface.py

@ -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:

Loading…
Cancel
Save