mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 08:52:05 +08:00
Use steeringAngleDeg for angle control saturation warnings (#25404)
* use steeringAngleDeg for angle control cars * update refs
This commit is contained in:
@@ -626,8 +626,13 @@ class Controls:
|
||||
if len(dpath_points):
|
||||
# Check if we deviated from the path
|
||||
# TODO use desired vs actual curvature
|
||||
left_deviation = actuators.steer > 0 and dpath_points[0] < -0.20
|
||||
right_deviation = actuators.steer < 0 and dpath_points[0] > 0.20
|
||||
if self.CP.steerControlType == car.CarParams.SteerControlType.angle:
|
||||
steering_value = actuators.steeringAngleDeg
|
||||
else:
|
||||
steering_value = actuators.steer
|
||||
|
||||
left_deviation = steering_value > 0 and dpath_points[0] < -0.20
|
||||
right_deviation = steering_value < 0 and dpath_points[0] > 0.20
|
||||
|
||||
if left_deviation or right_deviation:
|
||||
self.events.add(EventName.steerSaturated)
|
||||
|
||||
@@ -1 +1 @@
|
||||
461333164e531e3ffdac05b63b529aa5dce1186f
|
||||
3c89454df9cf2f25a5759d523a8c595e69865505
|
||||
Reference in New Issue
Block a user