mirror of https://github.com/arendst/Tasmota.git
fix missing button when turning on BLE (#22770)
This commit is contained in:
parent
2263305bee
commit
17ab5a5e83
|
@ -235,7 +235,7 @@ struct {
|
||||||
uint32_t handleEveryDevice:1;
|
uint32_t handleEveryDevice:1;
|
||||||
} option;
|
} option;
|
||||||
#ifdef USE_MI_EXT_GUI
|
#ifdef USE_MI_EXT_GUI
|
||||||
uint32_t widgetSlot;
|
uint32_t widgetSlot = 0;
|
||||||
#ifdef USE_ENERGY_SENSOR
|
#ifdef USE_ENERGY_SENSOR
|
||||||
uint8_t energy_history[24];
|
uint8_t energy_history[24];
|
||||||
#endif //USE_ENERGY_SENSOR
|
#endif //USE_ENERGY_SENSOR
|
||||||
|
|
|
@ -2624,7 +2624,6 @@ void MI32sendWidget(uint32_t slot){
|
||||||
}
|
}
|
||||||
|
|
||||||
void MI32InitGUI(void){
|
void MI32InitGUI(void){
|
||||||
MI32.widgetSlot=0;
|
|
||||||
WSContentStart_P("m32");
|
WSContentStart_P("m32");
|
||||||
WSContentSend_P(HTTP_MI32_SCRIPT_1);
|
WSContentSend_P(HTTP_MI32_SCRIPT_1);
|
||||||
WSContentSendStyle();
|
WSContentSendStyle();
|
||||||
|
@ -2938,6 +2937,20 @@ int ExtStopBLE(){
|
||||||
|
|
||||||
bool Xsns62(uint32_t function)
|
bool Xsns62(uint32_t function)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#ifdef USE_WEBSERVER
|
||||||
|
#ifdef USE_MI_EXT_GUI
|
||||||
|
switch (function) {
|
||||||
|
case FUNC_WEB_ADD_MAIN_BUTTON:
|
||||||
|
WSContentSend_P(HTTP_BTN_MENU_MI32);
|
||||||
|
break;
|
||||||
|
case FUNC_WEB_ADD_HANDLER:
|
||||||
|
WebServer_on(PSTR("/m32"), MI32HandleWebGUI);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
#endif //USE_MI_EXT_GUI
|
||||||
|
#endif //USE_WEBSERVER
|
||||||
|
|
||||||
if (!Settings->flag5.mi32_enable) { return false; } // SetOption115 - Enable ESP32 MI32 BLE
|
if (!Settings->flag5.mi32_enable) { return false; } // SetOption115 - Enable ESP32 MI32 BLE
|
||||||
|
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
@ -2977,14 +2990,6 @@ bool Xsns62(uint32_t function)
|
||||||
case FUNC_WEB_SENSOR:
|
case FUNC_WEB_SENSOR:
|
||||||
MI32Show(0);
|
MI32Show(0);
|
||||||
break;
|
break;
|
||||||
#ifdef USE_MI_EXT_GUI
|
|
||||||
case FUNC_WEB_ADD_MAIN_BUTTON:
|
|
||||||
if (Settings->flag5.mi32_enable) WSContentSend_P(HTTP_BTN_MENU_MI32);
|
|
||||||
break;
|
|
||||||
case FUNC_WEB_ADD_HANDLER:
|
|
||||||
WebServer_on(PSTR("/m32"), MI32HandleWebGUI);
|
|
||||||
break;
|
|
||||||
#endif //USE_MI_EXT_GUI
|
|
||||||
#endif // USE_WEBSERVER
|
#endif // USE_WEBSERVER
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue