Fix ESP32 TasmotaClient detection

Fix ESP32 TasmotaClient detection (#9218)
This commit is contained in:
Theo Arends 2020-09-03 14:29:08 +02:00
parent 1ae9620f45
commit d49997fa01
2 changed files with 6 additions and 1 deletions

View File

@ -2781,9 +2781,10 @@ void HandleUploadLoop(void)
} else
#endif // USE_RF_FLASH
#ifdef USE_TASMOTA_CLIENT
if ((WEMOS == my_module_type) && (upload.buf[0] == ':')) { // Check if this is a ARDUINO CLIENT hex file
if (TasmotaClient_Available() && (upload.buf[0] == ':')) { // Check if this is a ARDUINO CLIENT hex file
Update.end(); // End esp8266 update session
Web.upload_file_type = UPL_TASMOTACLIENT;
Web.upload_error = TasmotaClient_UpdateInit(); // 0
if (Web.upload_error != 0) { return; }
} else

View File

@ -458,6 +458,10 @@ void TasmotaClient_Init(void) {
}
}
bool TasmotaClient_Available(void) {
return TClient.SerialEnabled;
}
void TasmotaClient_Show(void) {
if ((TClient.type) && (TClientSettings.features.func_json_append)) {
char buffer[100];