mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Debug changed
This commit is contained in:
@@ -43,7 +43,7 @@ class LineParsing {
|
||||
|
||||
void update() {
|
||||
//String order = sCmd.order();
|
||||
//pm.info("create '" + order + "'");
|
||||
//SerialPrint("I","module","create '" + order + "'");
|
||||
for (int i = 1; i < 12; i++) {
|
||||
if (i == 1) _key = sCmd.next();
|
||||
if (i == 2) _file = sCmd.next();
|
||||
@@ -166,7 +166,7 @@ class LineParsing {
|
||||
buf = readFile(getWidgetFileClass(filename), 2048);
|
||||
bool res = !(buf == "Failed" || buf == "Large");
|
||||
if (!res) {
|
||||
//pm.error("on load" + filename);
|
||||
//SerialPrint("[E]","module","on load" + filename);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class Scenario {
|
||||
flag = _eventValue.toInt() <= _conditionValue.toInt();
|
||||
}
|
||||
|
||||
if (flag) Serial.println("[I] Scenario event: " + _condition);
|
||||
if (flag) Serial.println("I Scenario event: " + _condition);
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#endif
|
||||
|
||||
class Clock {
|
||||
const char* MODULE = "Clock";
|
||||
|
||||
|
||||
private:
|
||||
Time_t _time_local;
|
||||
@@ -71,7 +71,7 @@ class Clock {
|
||||
|
||||
void startSync() {
|
||||
if (!_configured) {
|
||||
//pm.info("sync to: " + _ntp + " timezone: " + String(_timezone));
|
||||
//SerialPrint("I","module","sync to: " + _ntp + " timezone: " + String(_timezone));
|
||||
setupSntp();
|
||||
_configured = true;
|
||||
// лучше не ждать, проверим в следующий раз
|
||||
@@ -79,9 +79,9 @@ class Clock {
|
||||
}
|
||||
_hasSynced = hasTimeSynced();
|
||||
if (_hasSynced) {
|
||||
//pm.info("synced " + getDateDotFormated() + " " + getTime());
|
||||
//SerialPrint("I","module","synced " + getDateDotFormated() + " " + getTime());
|
||||
} else {
|
||||
//pm.error("failed to obtain");
|
||||
//SerialPrint("[E]","module","failed to obtain");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Utils\SysUtils.h"
|
||||
#include "Utils\PrintMessage.h"
|
||||
#include "Utils\WiFiUtils.h"
|
||||
#include "Utils\SerialPrint.h"
|
||||
|
||||
#include <Adafruit_BME280.h>
|
||||
#include <Adafruit_BMP280.h>
|
||||
@@ -34,6 +35,7 @@
|
||||
#include <ArduinoOTA.h>
|
||||
|
||||
|
||||
|
||||
#ifdef WEBSOCKET_ENABLED
|
||||
extern AsyncWebSocket ws;
|
||||
//extern AsyncEventSource events;
|
||||
|
||||
3
include/Utils/SerialPrint.h
Normal file
3
include/Utils/SerialPrint.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
void SerialPrint(String errorLevel, String module, String msg);
|
||||
@@ -25,7 +25,7 @@ class SensorAnalogClass : public SensorConvertingClass {
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
MqttClient::publishStatus(key, String(valueFl));
|
||||
Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
// eventGen(key, "");
|
||||
// jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
// MqttClient::publishStatus(key, String(valueFl));
|
||||
// Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
// Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -37,7 +37,7 @@ class SensorDallasClass : public SensorConvertingClass {
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
MqttClient::publishStatus(key, String(valueFl));
|
||||
Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class SensorDhtClass : public SensorConvertingClass {
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
MqttClient::publishStatus(key, String(valueFl));
|
||||
Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
} else {
|
||||
Serial.println("[E] sensor '" + key);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class SensorDhtClass : public SensorConvertingClass {
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
MqttClient::publishStatus(key, String(valueFl));
|
||||
Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
} else {
|
||||
Serial.println("[E] sensor '" + key);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class SensorUltrasonic : public SensorConvertingClass {
|
||||
eventGen(key, "");
|
||||
jsonWriteStr(configLiveJson, key, String(valueFl));
|
||||
MqttClient::publishStatus(key, String(valueFl));
|
||||
Serial.println("[I] sensor '" + key + "' data: " + String(valueFl));
|
||||
Serial.println("I sensor '" + key + "' data: " + String(valueFl));
|
||||
}
|
||||
};
|
||||
extern SensorUltrasonic mySensorUltrasonic;
|
||||
Reference in New Issue
Block a user