This commit is contained in:
21
src/tools/tools.cpp
Normal file
21
src/tools/tools.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <Arduino.h>
|
||||
#include "tools.h"
|
||||
#include <ArduinoLog.h>
|
||||
|
||||
void printSuffix(Print* _logOutput, int logLevel)
|
||||
{
|
||||
_logOutput->print(CR);
|
||||
}
|
||||
|
||||
void print_prefix(Print* _logOutput, int logLevel)
|
||||
{
|
||||
_logOutput->print("WATERMETER - C");
|
||||
_logOutput->print(xPortGetCoreID());
|
||||
_logOutput->print(" - ");
|
||||
_logOutput->print(pcTaskGetName(xTaskGetCurrentTaskHandle()));
|
||||
_logOutput->print(" - ");
|
||||
}
|
||||
|
||||
bool is_error(ActiveErrors active_errors) {
|
||||
return active_errors.current_high || active_errors.current_low || active_errors.level_high || active_errors.level_low || active_errors.voltage_high || active_errors.voltage_low;
|
||||
}
|
||||
Reference in New Issue
Block a user