LoggerHelperMacros¶
Module: LIBDAISY / HUMAN_INTERFACE / LOGGING
Defines¶
Name | |
---|---|
LOGGER_NEWLINE | |
LOGGER_BUFFER | |
PPCAT_NX(A, B) | |
PPCAT(A, B) | |
STRINGIZE_NX(A) | |
STRINGIZE(A) | |
FLT_FMT(_n) | |
FLT_VAR(_n, _x) | |
FLT_FMT3 | |
FLT_VAR3(_x) |
Macros Documentation¶
define LOGGER_NEWLINE¶
Logger configuration custom newline character sequence
define LOGGER_BUFFER¶
size in bytes
define PPCAT_NX¶
Helper macros for string concatenation and macro expansion non-expanding concatenation
define PPCAT¶
concatenate tokens
define STRINGIZE_NX¶
non-expanding stringize
define STRINGIZE¶
make a string
define FLT_FMT¶
Floating point output formatting string. Include in your printf-style format string example: printf("float value = " FLT_FMT(3) " continue like that", FLT_VAR(3, x));
define FLT_VAR¶
#define FLT_VAR(
_n,
_x
)
(_x < 0 ? '-' : ' '), (int)(abs(_x)), \
(int)(((abs(_x)) - (int)(abs(_x))) * pow(10, (_n)))
Floating point output variable preprocessing Note: uses truncation instead of rounding -> the last digit may be off
define FLT_FMT3¶
Shorthand for 10^-3 fraction, output equivalent to %.3f
define FLT_VAR3¶
Shorthand for 10^-3 fraction
Updated on 2024-01-03 at 19:41:01 +0000