Hello,
i am working with a project on a S1 MCU and I figured out that the "snprintf" function does not work with float.
Try this dummy code:
#include "new_thread0.h"
#include "stdio.h"
void new_thread0_entry(void);
/* New Thread entry function */
void new_thread0_entry(void)
{
char tmp[100];
while (1)
{
float a = 25.2;
snprintf( tmp, 100, "%f4.2", a );
tx_thread_sleep (1);
}
}
The resulting "tmp" array is completly wrong.
Am i doing anything wrong?