Procházet zdrojové kódy

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
LordGuilly před 2 roky
rodič
revize
3497a86084

+ 2 - 2
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
         }
     }

+ 5 - 0
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<std::string, std::function<void()>>* connectFunktionMap = NULL;