The threads running commands for clients through the Posix daemon used
to write to a char buffer through snprintf (etc.) which was then written
directly to the file descriptor, whereas in the other case printf
(etc.) was used to write to stdout (FILE*). Both versions used some
macro's and repeated code to have the same output.
This change unifies these two cases by using a FILE* in both cases. The
(line) buffering is done by the standard C library's implementation
(just like with stdout), and px4_log.c now uses the same code in all
cases (using fprintf, etc.) for printing (colored) output.
- running at max priority significantly decreases jitter for the latency
test, providing more consistent results
- stack size increase is required for the latency test
If they're in the header and the header is used in multiple .cpp, there
are multiple definitions. Oddly it did not lead to an error, but there
were multiple structs of the same topic but with different adresses.
This lead to a metadata mismatch, when running eg:
uorb_tests
uorb_tests latency_test
It makes more sense to set the optimization flags on a platform basis
instead of individually for each module. This allows for different
optimization options for SITL, NuttX, Snapdragon, etc.
This is required for the logger, we just manually add the padding bytes
what would otherwise be done by the compiler. Additionally we reorder
the fields by type, so that padding is only necessary for nested types.