example 'meshtastic': fix for background mode

This commit is contained in:
pls.153 2024-03-05 17:41:35 +01:00
parent 003fa9f594
commit b45af08c87

View file

@ -110,8 +110,13 @@ QT::QT() : QObject() {
ble->setBackgroundMode(true);
ecl_fun("app:background-mode-changed", true);
} else if (state == Qt::ApplicationActive) {
ble->setBackgroundMode(false);
ecl_fun("app:background-mode-changed", false);
static bool startup = true;
if (startup) {
startup = false;
} else {
ble->setBackgroundMode(false);
ecl_fun("app:background-mode-changed", false);
}
}
});
#endif