From 58c8841299911514a290068e6ad5013791ddc14d Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 13 Jun 2021 10:43:10 +0200 Subject: [PATCH] Fix TasmotaClient compilation regression --- tasmota/tasmota.ino | 2 +- tasmota/xdrv_31_tasmota_client.ino | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasmota/tasmota.ino b/tasmota/tasmota.ino index dd6aefedd..db3b28cf3 100644 --- a/tasmota/tasmota.ino +++ b/tasmota/tasmota.ino @@ -262,7 +262,6 @@ void setup(void) { // Serial.setRxBufferSize(INPUT_BUFFER_SIZE); // Default is 256 chars TasmotaGlobal.seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded - #ifdef ESP8266 #ifdef PIO_FRAMEWORK_ARDUINO_MMU_CACHE16_IRAM48_SECHEAP_SHARED ESP.setIramHeap(); @@ -281,6 +280,7 @@ void setup(void) { Settings = (TSettings*)malloc(sizeof(TSettings)); } +// AddLog(LOG_LEVEL_INFO, PSTR("ADR: Settings %p, Log %p"), Settings, TasmotaGlobal.log_buffer); AddLog(LOG_LEVEL_INFO, PSTR("HDW: %s"), GetDeviceHardware().c_str()); #ifdef USE_UFILESYS diff --git a/tasmota/xdrv_31_tasmota_client.ino b/tasmota/xdrv_31_tasmota_client.ino index 292a99db5..6301393d7 100644 --- a/tasmota/xdrv_31_tasmota_client.ino +++ b/tasmota/xdrv_31_tasmota_client.ino @@ -419,12 +419,12 @@ void TasmotaClient_Init(void) { uint8_t len = TasmotaClient_receiveData(buffer, sizeof(buffer)); // 99 17 34 01 02 00 00 00 if (len == sizeof(TClientSettings)) { memcpy(&TClientSettings, &buffer, sizeof(TClientSettings)); - if (TASMOTA_CLIENT_LIB_VERSION == TClientSettings->features_version) { + if (TASMOTA_CLIENT_LIB_VERSION == TClientSettings.features_version) { TClient.type = true; - AddLog(LOG_LEVEL_INFO, PSTR("TCL: Version %u"), TClientSettings->features_version); + AddLog(LOG_LEVEL_INFO, PSTR("TCL: Version %u"), TClientSettings.features_version); } else { - if ((!TClient.unsupported) && (TClientSettings->features_version > 0)) { - AddLog(LOG_LEVEL_INFO, PSTR("TCL: Version %u not supported!"), TClientSettings->features_version); + if ((!TClient.unsupported) && (TClientSettings.features_version > 0)) { + AddLog(LOG_LEVEL_INFO, PSTR("TCL: Version %u not supported!"), TClientSettings.features_version); TClient.unsupported = true; } } @@ -437,7 +437,7 @@ bool TasmotaClient_Available(void) { } void TasmotaClient_Show(void) { - if ((TClient.type) && (TClientSettings->features.func_json_append)) { + if ((TClient.type) && (TClientSettings.features.func_json_append)) { TasmotaClient_sendCmnd(CMND_JSON, 0); char buffer[100]; @@ -540,19 +540,19 @@ bool Xdrv31(uint8_t function) { if (TasmotaClient_Serial->available()) { TasmotaClient_ProcessIn(); } - if (TClientSettings->features.func_every_100_msecond) { + if (TClientSettings.features.func_every_100_msecond) { TasmotaClient_sendCmnd(CMND_FUNC_EVERY_100_MSECOND, 0); } } break; case FUNC_EVERY_SECOND: - if ((TClient.type) && (TClientSettings->features.func_every_second)) { + if ((TClient.type) && (TClientSettings.features.func_every_second)) { TasmotaClient_sendCmnd(CMND_FUNC_EVERY_SECOND, 0); } TasmotaClient_Init(); break; case FUNC_JSON_APPEND: - if ((TClient.type) && (TClientSettings->features.func_json_append)) { + if ((TClient.type) && (TClientSettings.features.func_json_append)) { TasmotaClient_Show(); } break;