From 422773bb9f9f3850cd12f70c97dfcd4311b3ddb5 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sat, 18 May 2024 18:50:32 +0200 Subject: [PATCH] Refactor model generation condition in modeld.py Fixed the conditional statement checking the model generation and custom model status in modeld.py. Now, the navigation features and instructions are only updated if a custom model is being used and the model generation is not 4. --- selfdrive/modeld/modeld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/modeld/modeld.py b/selfdrive/modeld/modeld.py index 40e071294a..70777de099 100755 --- a/selfdrive/modeld/modeld.py +++ b/selfdrive/modeld/modeld.py @@ -133,7 +133,7 @@ class ModelState: self.inputs['traffic_convention'][:] = inputs['traffic_convention'] if not (self.custom_model and self.model_gen == 1): self.inputs['lateral_control_params'][:] = inputs['lateral_control_params'] - if not (self.custom_model and self.model_gen == 4): + if self.custom_model and self.model_gen != 4: self.inputs['nav_features'][:] = inputs['nav_features'] self.inputs['nav_instructions'][:] = inputs['nav_instructions']