User Set Steer Ratio

This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 5e77c2dea0
commit 0e6884df41
6 changed files with 37 additions and 6 deletions

View File

@@ -616,7 +616,7 @@ class Controls:
# Update VehicleModel
lp = self.sm['liveParameters']
x = max(lp.stiffnessFactor, 0.1)
sr = max(lp.steerRatio, 0.1)
sr = max(self.steer_ratio, 0.1)
self.VM.update_params(x, sr)
# Update Torque Params
@@ -994,6 +994,9 @@ class Controls:
self.green_light_alert = self.params.get_bool("GreenLightAlert")
lateral_tune = self.params.get_bool("LateralTune")
self.steer_ratio = self.params.get_int("SteerRatio") / 100 if lateral_tune else self.params.get_int("SteerRatioStock") / 100
longitudinal_tune = self.params.get_bool("LongitudinalTune")
self.sport_plus = self.params.get_int("AccelerationProfile") == 3 and longitudinal_tune