The rest
This commit is contained in:
@@ -134,10 +134,13 @@ 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)
|
||||
steer_ratio = params_reader.get_float("SteerRatio")
|
||||
steer_ratio_stock = params_reader.get_float("SteerRatioStock")
|
||||
|
||||
if steer_ratio_stock != CP.steerRatio or steer_ratio >= steer_ratio_stock * 2:
|
||||
params_reader.put_float("SteerRatio", CP.steerRatio)
|
||||
params_reader.put_float("SteerRatioStock", CP.steerRatio)
|
||||
params_reader.put_bool("DoReboot", True)
|
||||
|
||||
min_sr, max_sr = 0.5 * CP.steerRatio, 2.0 * CP.steerRatio
|
||||
|
||||
|
||||
Reference in New Issue
Block a user