reverting version

This commit is contained in:
Dmitry Borisenko
2020-09-02 22:34:49 +03:00
parent 70096c71c8
commit 2e8ea582d2
286 changed files with 29912 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#pragma once
#include "Arduino.h"
#include "Utils\StringUtils.h"
#include "Utils\TimeUtils.h"
#include "Errors.h"
#include "Global.h"
#define pm PrintMessage(MODULE)
class PrintMessage {
public:
PrintMessage(const char* module) {
_module = module;
}
void error(const String& str) {
print(EL_ERROR, str);
}
void info(const String& str) {
print(EL_INFO, str);
}
private:
void print(const ErrorLevel_t level, const String& str) {
Serial.printf("%s [%s] [%s] %s\n", prettyMillis(millis()).c_str(), getErrorLevelStr(level).c_str(), _module, str.c_str());
}
private:
const char* _module;
};