mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-14 06:23:07 +01:00
improve status handling for twai, add n2k state to UI
This commit is contained in:
@@ -37,9 +37,12 @@ void GwLog::logString(const char *fmt,...){
|
||||
xSemaphoreGive(locker);
|
||||
}
|
||||
void GwLog::logDebug(int level,const char *fmt,...){
|
||||
if (level > logLevel) return;
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
logDebug(level,fmt,args);
|
||||
}
|
||||
void GwLog::logDebug(int level,const char *fmt,va_list args){
|
||||
if (level > logLevel) return;
|
||||
xSemaphoreTake(locker, portMAX_DELAY);
|
||||
recordCounter++;
|
||||
vsnprintf(buffer,bufferSize-1,fmt,args);
|
||||
|
||||
@@ -27,6 +27,7 @@ class GwLog{
|
||||
void setWriter(GwLogWriter *writer);
|
||||
void logString(const char *fmt,...);
|
||||
void logDebug(int level, const char *fmt,...);
|
||||
void logDebug(int level, const char *fmt,va_list ap);
|
||||
int isActive(int level){return level <= logLevel;};
|
||||
void flush();
|
||||
void setLevel(int level){this->logLevel=level;}
|
||||
|
||||
Reference in New Issue
Block a user