mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-10-10 17:43:41 +08:00
@@ -203,6 +203,10 @@ 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
|
||||
|
||||
@@ -257,13 +261,7 @@ 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<ButtonControl *>()) {
|
||||
if (btn != pair_device) {
|
||||
|
||||
Reference in New Issue
Block a user