mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +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,13 +1478,15 @@ 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; }
|
||||||
|
|
||||||
|
if (!TasmotaGlobal.global_state.wifi_down) {
|
||||||
TasmotaGlobal.wifi_stay_asleep = true;
|
TasmotaGlobal.wifi_stay_asleep = true;
|
||||||
if (WiFi.getSleep() == false) {
|
if (WiFi.getSleep() == false) {
|
||||||
AddLog(LOG_LEVEL_DEBUG,PSTR("%s: Put WiFi modem in sleep mode"),"BLE");
|
AddLog(LOG_LEVEL_DEBUG,PSTR("%s: Put WiFi modem in sleep mode"), "BLE");
|
||||||
WiFi.setSleep(true); // Sleep
|
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
|
||||||
installExamples();
|
installExamples();
|
||||||
|
@ -789,13 +789,15 @@ 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; }
|
||||||
|
|
||||||
|
if (!TasmotaGlobal.global_state.wifi_down) {
|
||||||
TasmotaGlobal.wifi_stay_asleep = true;
|
TasmotaGlobal.wifi_stay_asleep = true;
|
||||||
if (WiFi.getSleep() == false) {
|
if (WiFi.getSleep() == false) {
|
||||||
AddLog(LOG_LEVEL_DEBUG,PSTR("M32: Put WiFi modem in sleep mode"));
|
AddLog(LOG_LEVEL_DEBUG,PSTR("M32: Put WiFi modem in sleep mode"));
|
||||||
WiFi.setSleep(true); // Sleep
|
WiFi.setSleep(true); // Sleep
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!MI32.mode.init) {
|
if (!MI32.mode.init) {
|
||||||
NimBLEDevice::init("");
|
NimBLEDevice::init("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user