mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 15:23:46 +08:00
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.
This commit is contained in:
@@ -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']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user