mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-25 22:13:53 +08:00
joystick mode: add curvature control (#30010)
* Added curvature controls to joystick mode * same line --------- Co-authored-by: Shane Smiskol <shane@smiskol.com>
This commit is contained in:
committed by
GitHub
parent
2ebf0b186e
commit
c43325fa17
@@ -629,8 +629,8 @@ class Controls:
|
||||
|
||||
if CC.latActive:
|
||||
steer = clip(self.sm['testJoystick'].axes[1], -1, 1)
|
||||
# max angle is 45 for angle-based cars
|
||||
actuators.steer, actuators.steeringAngleDeg = steer, steer * 45.
|
||||
# max angle is 45 for angle-based cars, max curvature is 0.02
|
||||
actuators.steer, actuators.steeringAngleDeg, actuators.curvature = steer, steer * 45., steer * -0.02
|
||||
|
||||
lac_log.active = self.active
|
||||
lac_log.steeringAngleDeg = CS.steeringAngleDeg
|
||||
|
||||
Reference in New Issue
Block a user