diff --git a/selfdrive/car/mazda/carcontroller.py b/selfdrive/car/mazda/carcontroller.py index ce31cd2c0be40a..20d80e519adf5c 100644 --- a/selfdrive/car/mazda/carcontroller.py +++ b/selfdrive/car/mazda/carcontroller.py @@ -23,17 +23,17 @@ def update(self, enabled, CS, frame, actuators): CS.out.steeringTorque, SteerLimitParams) self.steer_rate_limited = new_steer != apply_steer - if CS.out.standstill and frame % 50 == 0: + if CS.out.standstill and frame % 20 == 0: # Mazda Stop and Go requires a RES button (or gas) press if the car stops more than 3 seconds - # Send Resume button at 2hz if we're engaged at standstill to support full stop and go! + # Send Resume button at 5hz if we're engaged at standstill to support full stop and go! # TODO: improve the resume trigger logic by looking at actual radar data can_sends.append(mazdacan.create_button_cmd(self.packer, CS.CP.carFingerprint, Buttons.RESUME)) else: apply_steer = 0 self.steer_rate_limited = False - if CS.out.cruiseState.enabled and frame % 10 == 0: + if CS.out.cruiseState.enabled and frame % 20 == 0: # Cancel Stock ACC if it's enabled while OP is disengaged - # Match stock message rate which is sent at 10hz + # Send at a rate of 5hz until we sync with stock ACC state can_sends.append(mazdacan.create_button_cmd(self.packer, CS.CP.carFingerprint, Buttons.CANCEL)) self.apply_steer_last = apply_steer diff --git a/selfdrive/car/mazda/interface.py b/selfdrive/car/mazda/interface.py index f4af318945038c..2cd286b6ed35c3 100755 --- a/selfdrive/car/mazda/interface.py +++ b/selfdrive/car/mazda/interface.py @@ -44,7 +44,7 @@ def get_params(candidate, fingerprint=gen_empty_fingerprint(), has_relay=False, ret.lateralTuning.pid.kf = 0.00006 # No steer below disable speed - ret.minSteerSpeed = LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS + ret.minSteerSpeed = round(LKAS_LIMITS.DISABLE_SPEED * CV.KPH_TO_MS) ret.centerToFront = ret.wheelbase * 0.41