From 3497a86084deb6c6d2c6700680c6a2608ff9d274 Mon Sep 17 00:00:00 2001 From: LordGuilly Date: Sun, 9 Jul 2023 21:59:34 +0100 Subject: [PATCH] fixed build issues when enabling DEBUG_DETAIL_ON (#2509) fixed build issues when enabling DEBUG_DETAIL_ON added missing header when DEBUG_DETAIL_ON is enabled --- code/components/jomjol_flowcontroll/MainFlowControl.cpp | 4 ++-- code/components/jomjol_mqtt/interface_mqtt.cpp | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/components/jomjol_flowcontroll/MainFlowControl.cpp b/code/components/jomjol_flowcontroll/MainFlowControl.cpp index a96e383b..18f1f723 100644 --- a/code/components/jomjol_flowcontroll/MainFlowControl.cpp +++ b/code/components/jomjol_flowcontroll/MainFlowControl.cpp @@ -230,7 +230,7 @@ esp_err_t handler_stream(httpd_req_t *req) if (httpd_query_key_value(_query, "flashlight", _value, 10) == ESP_OK) { #ifdef DEBUG_DETAIL_ON - ESP_LOGD(TAG, "flashlight is found%s", _size); + ESP_LOGD(TAG, "flashlight is found%s", _value); #endif if (strlen(_value) > 0) flashlightOn = true; @@ -890,7 +890,7 @@ esp_err_t handler_prevalue(httpd_req_t *req) if (httpd_query_key_value(_query, "value", _value, 20) == ESP_OK) { #ifdef DEBUG_DETAIL_ON - ESP_LOGD(TAG, "Value: %s", _size); + ESP_LOGD(TAG, "Value: %s", _value); #endif } } diff --git a/code/components/jomjol_mqtt/interface_mqtt.cpp b/code/components/jomjol_mqtt/interface_mqtt.cpp index 1ab8f03f..aa21fe7d 100644 --- a/code/components/jomjol_mqtt/interface_mqtt.cpp +++ b/code/components/jomjol_mqtt/interface_mqtt.cpp @@ -9,6 +9,11 @@ #include "cJSON.h" #include "../../include/defines.h" +#if DEBUG_DETAIL_ON +#include "esp_timer.h" +#endif + + static const char *TAG = "MQTT IF"; std::map>* connectFunktionMap = NULL;