mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 10:16:30 +00:00
Allow BLE when ethernet only connected
Allow BLE when ethernet only connected (#10753)
This commit is contained in:
parent
6836455bbe
commit
5d58eb39cf
@ -1478,12 +1478,14 @@ static void BLEInit(void) {
|
|||||||
|
|
||||||
if (BLEInitState) { return; }
|
if (BLEInitState) { return; }
|
||||||
|
|
||||||
if (TasmotaGlobal.global_state.wifi_down) { return; }
|
if (TasmotaGlobal.global_state.wifi_down && TasmotaGlobal.global_state.eth_down) { return; }
|
||||||
|
|
||||||
TasmotaGlobal.wifi_stay_asleep = true;
|
if (!TasmotaGlobal.global_state.wifi_down) {
|
||||||
if (WiFi.getSleep() == false) {
|
TasmotaGlobal.wifi_stay_asleep = true;
|
||||||
AddLog(LOG_LEVEL_DEBUG,PSTR("%s: Put WiFi modem in sleep mode"),"BLE");
|
if (WiFi.getSleep() == false) {
|
||||||
WiFi.setSleep(true); // Sleep
|
AddLog(LOG_LEVEL_DEBUG,PSTR("%s: Put WiFi modem in sleep mode"), "BLE");
|
||||||
|
WiFi.setSleep(true); // Sleep
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is only for testing, does nothin if examples are undefed
|
// this is only for testing, does nothin if examples are undefed
|
||||||
|
@ -789,12 +789,14 @@ void MI32PreInit(void) {
|
|||||||
void MI32Init(void) {
|
void MI32Init(void) {
|
||||||
if (MI32.mode.init) { return; }
|
if (MI32.mode.init) { return; }
|
||||||
|
|
||||||
if (TasmotaGlobal.global_state.wifi_down) { return; }
|
if (TasmotaGlobal.global_state.wifi_down && TasmotaGlobal.global_state.eth_down) { return; }
|
||||||
|
|
||||||
TasmotaGlobal.wifi_stay_asleep = true;
|
if (!TasmotaGlobal.global_state.wifi_down) {
|
||||||
if (WiFi.getSleep() == false) {
|
TasmotaGlobal.wifi_stay_asleep = true;
|
||||||
AddLog(LOG_LEVEL_DEBUG,PSTR("M32: Put WiFi modem in sleep mode"));
|
if (WiFi.getSleep() == false) {
|
||||||
WiFi.setSleep(true); // Sleep
|
AddLog(LOG_LEVEL_DEBUG,PSTR("M32: Put WiFi modem in sleep mode"));
|
||||||
|
WiFi.setSleep(true); // Sleep
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!MI32.mode.init) {
|
if (!MI32.mode.init) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user