|
|
@ -194,7 +194,8 @@ class CarInterface(object): |
|
|
|
|
|
|
|
|
|
|
|
# cruise state |
|
|
|
# cruise state |
|
|
|
ret.cruiseState.available = bool(self.CS.main_on) |
|
|
|
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.cruiseState.standstill = self.CS.pcm_acc_status == 4 |
|
|
|
|
|
|
|
|
|
|
|
ret.leftBlinker = self.CS.left_blinker_on |
|
|
|
ret.leftBlinker = self.CS.left_blinker_on |
|
|
@ -228,7 +229,8 @@ class CarInterface(object): |
|
|
|
be.pressed = False |
|
|
|
be.pressed = False |
|
|
|
but = self.CS.prev_cruise_buttons |
|
|
|
but = self.CS.prev_cruise_buttons |
|
|
|
if but == CruiseButtons.RES_ACCEL: |
|
|
|
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: |
|
|
|
elif but == CruiseButtons.DECEL_SET: |
|
|
|
be.type = 'decelCruise' |
|
|
|
be.type = 'decelCruise' |
|
|
|
elif but == CruiseButtons.CANCEL: |
|
|
|
elif but == CruiseButtons.CANCEL: |
|
|
|