From dcfe4fd98359b91cfbbd5b2e47c4aa97e4551579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 7 Feb 2025 20:46:14 -0800 Subject: [PATCH] Update alert --- selfdrive/locationd/lagd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/locationd/lagd.py b/selfdrive/locationd/lagd.py index f8e5fb061a..80b7b7bbf6 100644 --- a/selfdrive/locationd/lagd.py +++ b/selfdrive/locationd/lagd.py @@ -59,7 +59,7 @@ class LagEstimator(ParameterEstimator): elif which == "controlsState": curvature = msg.curvature desired_curvature = msg.desiredCurvature - if self.lat_active and not self.steering_pressed: + if self.lat_active and not self.steering_pressed and self.v_ego > MIN_LAG_VEL: self.curvature.append((t, curvature)) self.desired_curvature.append((t, desired_curvature)) self.frame += 1 @@ -114,7 +114,7 @@ def main(): if sm.frame % 25 == 0: msg = estimator.get_msg(sm.all_checks(), with_points=True) alert_msg = messaging.new_message('alertDebug') - alert_msg.alertDebug.alertText1 = f"Lag estimateb (fixed: {CP.steerActuatorDelay:.2f} s)" + alert_msg.alertDebug.alertText1 = f"Lag estimate (fixed: {CP.steerActuatorDelay:.2f} s)" alert_msg.alertDebug.alertText2 = f"{msg.liveActuatorDelay.steerActuatorDelay:.2f} s" pm.send('liveActuatorDelay', msg)