RF24Log
0.1.3
Unified logging library
|
Because all Arduino cores for all Arduino compatible boards don't unanimously support printf, we have a basic imitation mechanism included with RF24LogPrintfParser.
The format specifiers' usage:
The following list of characters that follow a % symbol (or a flag
/pad_quantity
/precision_quantity
option) will signify that the corresponding argument is of a certain datatype.
Specifier | Representation |
---|---|
F / D | a double |
s / S | a string |
d / i | a signed integer |
du / iu / u / lu / hu | an unsigned integer |
x / X | an unsigned hexadecimal integer |
o | an unsigned octal integer |
b | an unsigned binary integer |
c | a single character |
% | escapes a single character |
These are the differences to standard printf parsing and our in-house printf parsing:
precision_quantity
as the number of decimal places. Specifying a pad_quantity
for padding the whole numbers of floats/doubles is not supported (thus the pad_quantity
has no affect on floats and doubles).S
) syntax because of the special __FlashStringHelper
implementation. All other platforms support using s
for strings.0
) for padding data with zeros instead of spaces. Other flags (+
, -
, ) have no affect.u
character will enforce numeric data to be interpreted as an unsigned long
number. Otherwise, all numeric data is represented as a signed long
number (float
and double
variables are represented as a double
).For each numeric data specifier, a quantity of padded characters can be designated before the specifer (but immediately after the % symbol). The default character used for padding is a space (), but putting a zero (0
) character flag
before the padding_quantity
changes the padding character to zeros (0
).
For example: