diff --git a/selfdrive/clearpilot/theme/clearpilot/sounds/prompt_distracted.wav b/selfdrive/clearpilot/theme/clearpilot/sounds/prompt_distracted.wav index c3d4475..5d6308b 100644 Binary files a/selfdrive/clearpilot/theme/clearpilot/sounds/prompt_distracted.wav and b/selfdrive/clearpilot/theme/clearpilot/sounds/prompt_distracted.wav differ diff --git a/selfdrive/ui/qt/home.cc b/selfdrive/ui/qt/home.cc index 49c85d5..a0d99c0 100644 --- a/selfdrive/ui/qt/home.cc +++ b/selfdrive/ui/qt/home.cc @@ -17,6 +17,9 @@ // HomeWindow: the container for the offroad and onroad UIs HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) { + // CLEARPILOT Sidebar set to invisible in drive view. + params.putBool("Sidebar", false); + QHBoxLayout *main_layout = new QHBoxLayout(this); main_layout->setMargin(0); main_layout->setSpacing(0); @@ -107,19 +110,25 @@ void HomeWindow::showDriverView(bool show, bool started) { } void HomeWindow::mousePressEvent(QMouseEvent* e) { - // Handle sidebar collapsing // CLEARPILOT todo - tap on main goes straight to settings // Unless we click a debug widget. - if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) { - sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible()); - uiState()->scene.map_open = onroad->isMapVisible(); - params.putBool("Sidebar", sidebar->isVisible()); - } + + // Handle sidebar collapsing + // if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) { + // sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible()); + // uiState()->scene.map_open = onroad->isMapVisible(); + // params.putBool("Sidebar", sidebar->isVisible()); + // } // CLEARPILOT - click ready shows home if (!onroad->isVisible() && ready->isVisible()) { slayout->setCurrentWidget(home); } + + // Todo: widgets + if (onroad->isVisible()) { + emit openSettings(); + } } void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) { diff --git a/selfdrive/ui/soundd.py b/selfdrive/ui/soundd.py index 7a9c612..7e8aec5 100644 --- a/selfdrive/ui/soundd.py +++ b/selfdrive/ui/soundd.py @@ -250,13 +250,16 @@ class Soundd: 11: "world_frog_day", } - if current_holiday_theme != 0: - theme_name = holiday_theme_configuration.get(current_holiday_theme) - self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/holiday_themes/" + theme_name + "/sounds/") - self.goat_scream = False - else: - theme_name = theme_configuration.get(custom_sounds) - self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/custom_themes/" + theme_name + "/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/") + # Clearpilot: Impl theme switcher + # if current_holiday_theme != 0: + # theme_name = holiday_theme_configuration.get(current_holiday_theme) + # self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/holiday_themes/" + theme_name + "/sounds/") + # self.goat_scream = False + # else: + # theme_name = theme_configuration.get(custom_sounds) + # self.sound_directory = BASEDIR + ("/selfdrive/clearpilot/theme/" + theme_name + "/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/") + + self.sound_directory = BASEDIR + ("/selfdrive/clearpilot/theme/clearpilot/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/") if self.sound_directory != self.previous_sound_directory: self.load_sounds()