From 72f45a7516174e230e6a52268e0684a0fed4b76f Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sun, 12 Jan 2025 09:31:37 -0500 Subject: [PATCH] unlikely but why not --- selfdrive/ui/qt/offroad/settings.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index b633bdf33a..da9de24f81 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -203,10 +203,6 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { }); addItem(pair_device); - QObject::connect(uiState()->prime_state, &PrimeState::changed, [this] (PrimeState::Type type) { - pair_device->setVisible(type == PrimeState::PRIME_TYPE_UNPAIRED); - }); - #ifndef SUNNYPILOT // offroad-only buttons @@ -261,7 +257,13 @@ DevicePanel::DevicePanel(SettingsWindow *parent) : ListWidget(parent) { } }); addItem(translateBtn); +#endif + QObject::connect(uiState()->prime_state, &PrimeState::changed, [this] (PrimeState::Type type) { + pair_device->setVisible(type == PrimeState::PRIME_TYPE_UNPAIRED); + }); + +#ifndef SUNNYPILOT QObject::connect(uiState(), &UIState::offroadTransition, [=](bool offroad) { for (auto btn : findChildren()) { if (btn != pair_device) {