From 19f3cfd3d70501ed7dc1116988331e4062088654 Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Wed, 8 Jan 2025 19:57:06 -0500 Subject: [PATCH] ui: update experimental mode button settings index (#539) --- selfdrive/ui/qt/offroad/experimental_mode.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/offroad/experimental_mode.cc b/selfdrive/ui/qt/offroad/experimental_mode.cc index b99220c1d..457b4053a 100644 --- a/selfdrive/ui/qt/offroad/experimental_mode.cc +++ b/selfdrive/ui/qt/offroad/experimental_mode.cc @@ -8,12 +8,18 @@ #include "selfdrive/ui/ui.h" +#ifdef SUNNYPILOT +constexpr int toggles_settings_index = 3; +#else +constexpr int toggles_settings_index = 2; +#endif + ExperimentalModeButton::ExperimentalModeButton(QWidget *parent) : QPushButton(parent) { chill_pixmap = QPixmap("../assets/img_couch.svg").scaledToWidth(img_width, Qt::SmoothTransformation); experimental_pixmap = QPixmap("../assets/img_experimental_grey.svg").scaledToWidth(img_width, Qt::SmoothTransformation); // go to toggles and expand experimental mode description - connect(this, &QPushButton::clicked, [=]() { emit openSettings(2, "ExperimentalMode"); }); + connect(this, &QPushButton::clicked, [=]() { emit openSettings(toggles_settings_index, "ExperimentalMode"); }); setFixedHeight(125); QHBoxLayout *main_layout = new QHBoxLayout;