chprintf broken ???
Posted: Tue Aug 09, 2016 11:30 am
it seems the field width no longer works on chprintf....
i.e.
in chibios 2.6 i used to display the time and date on the console like this
chprintf(chp, "Time : %.2d:%.2d:%.2d\r\n", gps->hrs, gps->min, gps->sec);
chprintf(chp, "Date : %.2d/%.2d/%.2d\r\n", gps->day, gps->mon, gps->year);
note the ".2" to ensure two chars are used, giving output of
01:02:03
04/05/06
using the same code on 16.1 you get this, seems to not work anymore ????
1:2:3
4/5/6
i.e.
in chibios 2.6 i used to display the time and date on the console like this
chprintf(chp, "Time : %.2d:%.2d:%.2d\r\n", gps->hrs, gps->min, gps->sec);
chprintf(chp, "Date : %.2d/%.2d/%.2d\r\n", gps->day, gps->mon, gps->year);
note the ".2" to ensure two chars are used, giving output of
01:02:03
04/05/06
using the same code on 16.1 you get this, seems to not work anymore ????
1:2:3
4/5/6