From 8832b12874fd871816610ed6c481211596ae6dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Wed, 9 Apr 2025 13:52:28 -0700 Subject: [PATCH] Add assert --- selfdrive/locationd/lagd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/selfdrive/locationd/lagd.py b/selfdrive/locationd/lagd.py index af402733cf..7e85d0b67b 100755 --- a/selfdrive/locationd/lagd.py +++ b/selfdrive/locationd/lagd.py @@ -289,6 +289,7 @@ def retrieve_initial_lag(params_reader: Params, CP: car.CarParams): raise Exception("Car model mismatch") lag, valid_blocks = ld.lateralDelayEstimate, ld.validBlocks + assert valid_blocks <= BLOCK_NUM, "Invalid number of valid blocks" return lag, valid_blocks except Exception as e: cloudlog.error(f"Failed to retrieve initial lag: {e}")