mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-08-01 14:16:48 +08:00
update carcontroller.py
This commit is contained in:
@@ -140,7 +140,8 @@ class CarController(CarControllerBase):
|
||||
"""
|
||||
if CS.out.standstill: # if we're stopped
|
||||
if not self.hold_delay.active(): # and we have been stopped for more than hold_delay duration. This prevents a hard brake if we aren't fully stopped.
|
||||
if (CC.cruiseControl.resume or CC.cruiseControl.override or CS.out.gasPressed or
|
||||
if ((CC.cruiseControl.resume and CC.actuators.longControlState != LongCtrlState.stopping) or
|
||||
CC.cruiseControl.override or CS.out.gasPressed or
|
||||
(CC.actuators.longControlState == LongCtrlState.starting) or CS.acc["RESUME"]): # and we want to resume
|
||||
self.resume_timer.reset() # reset the resume timer so its active
|
||||
else: # otherwise we're holding
|
||||
|
||||
Reference in New Issue
Block a user