joystickd: add cruise control resume (#36876)
* Add cruise control resume logic based on conditions * simple
This commit is contained in:
@@ -48,6 +48,7 @@ def joystickd_thread():
|
||||
if CC.longActive:
|
||||
actuators.accel = 4.0 * float(np.clip(joystick_axes[0], -1, 1))
|
||||
actuators.longControlState = LongCtrlState.pid if sm['carState'].vEgo > CP.vEgoStopping else LongCtrlState.stopping
|
||||
CC.cruiseControl.resume = actuators.accel > 0.0
|
||||
|
||||
if CC.latActive:
|
||||
max_curvature = MAX_LAT_ACCEL / max(sm['carState'].vEgo ** 2, 5)
|
||||
|
||||
Reference in New Issue
Block a user