This commit is contained in:
Dmitry Borisenko
2020-07-26 23:47:00 +02:00
parent f7f4e176b2
commit 4aa0dc39b9
236 changed files with 0 additions and 27262 deletions

View File

@@ -1,32 +0,0 @@
#pragma once
#include "Arduino.h"
#include "CommonTypes.h"
#include "Utils\StringUtils.h"
#include "Utils\TimeUtils.h"
#include "Errors.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;
};