Skip to content
Snippets Groups Projects

Make sleep work again when BLE is disabled

Merged rahix requested to merge rahix/fix-broken-shutdown into master
4 files
+ 21
10
Compare changes
  • Side-by-side
  • Inline
Files
4
+ 16
7
@@ -269,17 +269,26 @@ void RSV11_IRQHandler(void)
notify();
}
/*************************************************************************************************/
bool ble_shall_start(void)
bool ble_is_enabled(void)
{
bool ble_enabled = config_get_boolean_with_default("ble_enable", false);
/*
* 0 = unknown, check config
* 1 = disabled
* 2 = enabled
*/
static int ble_state = 0;
if (ble_enabled) {
LOG_INFO("ble", "BLE is enabled.");
} else {
LOG_INFO("ble", "BLE is disabled.");
if (ble_state == 0) {
if (config_get_boolean_with_default("ble_enable", false)) {
ble_state = 2;
LOG_INFO("ble", "BLE is enabled.");
} else {
ble_state = 1;
LOG_INFO("ble", "BLE is disabled.");
}
}
return ble_enabled;
return ble_state == 2;
}
/*************************************************************************************************/
static void scheduleTimer(void)
Loading