Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
FrogAi committed Dec 20, 2024
1 parent 66dd43a commit 613c46e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/frogpilot/frogpilot_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def update(self, holiday_theme, started):
toggle.model_randomizer = params.get_bool("ModelRandomizer") if tuning_level >= level["ModelRandomizer"] else default.get_bool("ModelRandomizer")
if available_models:
if toggle.model_randomizer:
if not started or not toggle.model:
if not started or not hasattr(toggle, "model"):
blacklisted_models = (params.get("BlacklistedModels", encoding='utf-8') or "").split(",")
existing_models = [model for model in available_models.split(",") if model not in blacklisted_models and (MODELS_PATH / f"{model}.thneed").exists()]
toggle.model = random.choice(existing_models) if existing_models else default.get("Model", encoding='utf-8')
Expand Down

0 comments on commit 613c46e

Please sign in to comment.