mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-21 20:44:47 +00:00
Fixes
This commit is contained in:
parent
1b852a254b
commit
fae59fa9c9
@ -1051,7 +1051,7 @@ int32_t Screen::runOnce()
|
||||
handleShutdownScreen();
|
||||
break;
|
||||
case Cmd::START_REBOOT_SCREEN:
|
||||
handleShutdownScreen();
|
||||
handleRebootScreen();
|
||||
break;
|
||||
default:
|
||||
DEBUG_MSG("BUG: invalid cmd\n");
|
||||
|
@ -211,11 +211,12 @@ void AdminModule::handleSetConfig(const Config &c)
|
||||
break;
|
||||
}
|
||||
|
||||
bool didSave = service.reloadConfig();
|
||||
|
||||
service.reloadConfig();
|
||||
// Reboot 5 seconds after a config that requires rebooting is set
|
||||
if (didSave && requiresReboot) {
|
||||
rebootAtMsec = millis() + 5 * 1000;
|
||||
if (requiresReboot) {
|
||||
DEBUG_MSG("Rebooting due to config changes\n");
|
||||
screen->startRebootScreen();
|
||||
rebootAtMsec = millis() + (5 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -98,6 +98,7 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks
|
||||
passkeyShowing = false;
|
||||
screen->stopBluetoothPinScreen();
|
||||
}
|
||||
bluetoothPhoneAPI->setInitalState();
|
||||
}
|
||||
|
||||
virtual void onDisconnect(NimBLEServer* pServer, ble_gap_conn_desc *desc)
|
||||
@ -127,6 +128,9 @@ bool NimbleBluetooth::isActive()
|
||||
|
||||
void NimbleBluetooth::setup()
|
||||
{
|
||||
// Uncomment for testing
|
||||
// NimbleBluetooth::clearBonds();
|
||||
|
||||
DEBUG_MSG("Initialise the NimBLE bluetooth module\n");
|
||||
|
||||
NimBLEDevice::init(getDeviceName());
|
||||
|
@ -209,8 +209,9 @@ void NRF52Bluetooth::shutdown()
|
||||
|
||||
void NRF52Bluetooth::setup()
|
||||
{
|
||||
Bluefruit.Periph.clearBonds();
|
||||
Bluefruit.Central.clearBonds();
|
||||
// Uncomment for testing
|
||||
// Bluefruit.Periph.clearBonds();
|
||||
// Bluefruit.Central.clearBonds();
|
||||
|
||||
// Initialise the Bluefruit module
|
||||
DEBUG_MSG("Initialise the Bluefruit nRF52 module\n");
|
||||
|
@ -8,7 +8,6 @@ void powerCommandsCheck()
|
||||
{
|
||||
if (rebootAtMsec && millis() > rebootAtMsec) {
|
||||
DEBUG_MSG("Rebooting\n");
|
||||
screen->startRebootScreen();
|
||||
#if defined(ARCH_ESP32)
|
||||
ESP.restart();
|
||||
#elif defined(ARCH_NRF52)
|
||||
|
Loading…
Reference in New Issue
Block a user