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

@@ -134,6 +134,11 @@ def main():
CP = msg
cloudlog.info("paramsd got CarParams")
steer_ratio_stock = params_reader.get_int("SteerRatioStock")
if steer_ratio_stock != CP.steerRatio * 100:
params_reader.put_int("SteerRatio", CP.steerRatio * 100)
params_reader.put_int("SteerRatioStock", CP.steerRatio * 100)
min_sr, max_sr = 0.5 * CP.steerRatio, 2.0 * CP.steerRatio
params = params_reader.get("LiveParameters")