AP_CANManager: exposed can log level

This commit is contained in:
Andrew Tridgell 2020-11-30 10:46:55 +11:00
parent cf22caa7ef
commit b2885e3e32
1 changed files with 7 additions and 1 deletions

View File

@ -42,7 +42,7 @@ public:
return _singleton; return _singleton;
} }
enum LogLevel { enum LogLevel : uint8_t {
LOG_NONE, LOG_NONE,
LOG_ERROR, LOG_ERROR,
LOG_WARNING, LOG_WARNING,
@ -76,6 +76,12 @@ public:
return nullptr; return nullptr;
} }
// returns current log level
LogLevel get_log_level(void) const
{
return LogLevel(_loglevel.get());
}
// Method to log status and debug information for review while debugging // Method to log status and debug information for review while debugging
void log_text(AP_CANManager::LogLevel loglevel, const char *tag, const char *fmt, ...); void log_text(AP_CANManager::LogLevel loglevel, const char *tag, const char *fmt, ...);