This alignment is performed when the USE_NEWLIB define is set in flight/PiOS/Common/printf2.c. Without setting this define, luck of the draw will decide which floating point prints display the correct value and which ones do not, depending on the arguments passed to printf/sprintf.
Unfortunately, printf2 alignment code is flawed and must be addressed in addition to enabling the define. Here is the code snip...
Notice the argument pointer is adjusted if any of the lower four bits are set. The correct test to be performed should be 'if ((caddr & 0x4) != 0) {'.
Please update the printf file and add the define to be enabled in the brain make process. I will submit my osd_menu.c code which adds OSD altitudehold and vtol_pathfollower settings change capability if the brainfpv developers are interested.
For all EABI ARM implementations, an eight byte stack alignment is required for floating point printf/sprintf calls. Please see https://wiki.debian.org/ArmEabiPort#Stack_alignment.
This alignment is performed when the USE_NEWLIB define is set in flight/PiOS/Common/printf2.c. Without setting this define, luck of the draw will decide which floating point prints display the correct value and which ones do not, depending on the arguments passed to printf/sprintf.
Unfortunately, printf2 alignment code is flawed and must be addressed in addition to enabling the define. Here is the code snip...
ifdef USE_NEWLIB
else
endif
Notice the argument pointer is adjusted if any of the lower four bits are set. The correct test to be performed should be 'if ((caddr & 0x4) != 0) {'.
Please update the printf file and add the define to be enabled in the brain make process. I will submit my osd_menu.c code which adds OSD altitudehold and vtol_pathfollower settings change capability if the brainfpv developers are interested.