From 39b09167eb311e7edaf95020722b1bc0124ce03b Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Sun, 9 Feb 2020 13:45:46 +0100 Subject: [PATCH 1/2] add unsigned long format capability --- ArduinoLog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduinoLog.cpp b/ArduinoLog.cpp index 4dba1aa..b66aa8b 100644 --- a/ArduinoLog.cpp +++ b/ArduinoLog.cpp @@ -169,6 +169,10 @@ void Logging::printFormat(const char format, va_list *args) { { _logOutput->print(va_arg(*args, long), DEC); } + else if (format == 'u') + { + _logOutput->print(va_arg(*args, unsigned long), DEC); + } else if (format == 'c') { _logOutput->print((char) va_arg(*args, int)); From a97f3eb6e2fa6baed12a89b9657f487007de2a56 Mon Sep 17 00:00:00 2001 From: Florian <1technophile@users.noreply.github.com> Date: Sun, 9 Feb 2020 14:00:07 +0100 Subject: [PATCH 2/2] add key for unsigned long values in help (%u) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cd0bb23..bf2ffaf 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,7 @@ where the format string can be used to format the log variables * %c display as single character * %d display as integer value * %l display as long value +* %u display as unsigned long value * %x display as hexadecimal value * %X display as hexadecimal value prefixed by `0x` * %b display as binary number