소스 검색

Added log + enabled MQTT debug

Thomas Chef 2 년 전
부모
커밋
a937601e62
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      main/config.h
  2. 2 0
      main/kWhCounter.c

+ 1 - 1
main/config.h

@@ -12,7 +12,7 @@
 #define ENABLE_KWH_COUNTER
 #define ENABLE_DS18B20
 
-//#define MQTT_DEBUG              // Add an extra debug string to the topic-string
+#define MQTT_DEBUG              // Add an extra debug string to the topic-string
 
 #define VVB_RELAY_OUTPUT_IO      GPIO_NUM_22   // Output GPIO of a relay control of VVB
 

+ 2 - 0
main/kWhCounter.c

@@ -37,6 +37,8 @@ void counterControlTask(void *pvParameters) {
 
         if( activeCnt > 0 ) kWh_cnt++;
 
+        ESP_LOGI("kWhCounter", "1s Pin: %u  Tot:%u", activeCnt, kWh_cnt);
+
         if( ++secondCnt == 60 ) {
             // Every 60 seconds
             ESP_LOGI("kWhCounter", "60 sec. Measure. Pin: %u  Tot:%u", activeCnt, kWh_cnt);