mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-25 09:42:05 +08:00
less if/else
This commit is contained in:
@@ -550,9 +550,9 @@ class CarController(CarControllerBase):
|
||||
self.accel_last = self.accel_val
|
||||
|
||||
def fast_resume(self, actuators, enabled, stopping):
|
||||
self.acc_enabled = enabled
|
||||
|
||||
if actuators.longControlState == LongCtrlState.starting and self.acc_enabled and self.prev_stop_req:
|
||||
self.acc_enabled = False
|
||||
else:
|
||||
self.acc_enabled = enabled
|
||||
|
||||
self.prev_stop_req = stopping
|
||||
|
||||
Reference in New Issue
Block a user