Holiday Themes

This commit is contained in:
FrogAi
2024-03-05 17:44:50 -07:00
parent 7ef99716cc
commit ae0c294aab
171 changed files with 304 additions and 28 deletions

7
selfdrive/controls/controlsd.py Executable file → Normal file
View File

@@ -178,6 +178,7 @@ class Controls:
self.frogpilot_variables = SimpleNamespace()
self.driving_gear = False
self.holiday_theme_alerted = False
self.previously_enabled = False
self.stopped_for_light_previously = False
@@ -320,6 +321,11 @@ class Controls:
frogpilot_plan = self.sm['frogpilotPlan']
# Show holiday related event to indicate which holiday is active
if self.sm.frame >= 1000 and self.holiday_themes and self.params_memory.get_int("CurrentHolidayTheme") != 0 and not self.holiday_theme_alerted:
self.events.add(EventName.holidayActive)
self.holiday_theme_alerted = True
# Add joystick event, static on cars, dynamic on nonCars
if self.joystick_mode:
self.events.add(EventName.joystickDebug)
@@ -1041,6 +1047,7 @@ class Controls:
custom_sounds = self.params.get_int("CustomSounds") if custom_theme else 0
frog_sounds = custom_sounds == 1
self.goat_scream = frog_sounds and self.params.get_bool("GoatScream")
self.holiday_themes = custom_theme and self.params.get_bool("HolidayThemes")
experimental_mode_activation = self.params.get_bool("ExperimentalModeActivation")
self.frogpilot_variables.experimental_mode_via_distance = experimental_mode_activation and self.params.get_bool("ExperimentalModeViaDistance")