diff --git a/selfdrive/controls/controlsd.py b/selfdrive/controls/controlsd.py index 4f00e59..e94d57e 100644 --- a/selfdrive/controls/controlsd.py +++ b/selfdrive/controls/controlsd.py @@ -568,7 +568,7 @@ class Controls: # Update VehicleModel lp = self.sm['liveParameters'] x = max(lp.stiffnessFactor, 0.1) - sr = max(lp.steerRatio, 0.1) + sr = max(self.frogpilot_toggles.steer_ratio, 0.1) if self.frogpilot_toggles.use_custom_steer_ratio else max(lp.steerRatio, 0.1) self.VM.update_params(x, sr) # Update Torque Params diff --git a/selfdrive/locationd/paramsd.py b/selfdrive/locationd/paramsd.py index 8c9d947..fd66a36 100644 --- a/selfdrive/locationd/paramsd.py +++ b/selfdrive/locationd/paramsd.py @@ -133,6 +133,11 @@ def main(): CP = msg cloudlog.info("paramsd got CarParams") + steer_ratio_stock = params_reader.get_float("SteerRatioStock") + if steer_ratio_stock != CP.steerRatio: + params_reader.put_float_nonblocking("SteerRatio", CP.steerRatio) + params_reader.put_float_nonblocking("SteerRatioStock", CP.steerRatio) + min_sr, max_sr = 0.5 * CP.steerRatio, 2.0 * CP.steerRatio params = params_reader.get("LiveParameters")