2024-04-07 12:49 PM
Hi, I'm using the APP_LOG function to print data to serial. Here's how i do it:
APP_LOG(TS_OFF, VLEVEL_L, "%d,%d,%d,%d,%d,", front_brake_pressure, rear_left_wheel_speed, rear_right_wheel_speed, front_left_wheel_speed, front_right_wheel_speed);
APP_LOG(TS_OFF, VLEVEL_L, "%d,%d,%d,%d,%f,%f,%f\n", inverter_fail, bms_fail, imd_fail, bspd_fail, latitude, longitude, altitude);
APP_LOG(TS_OFF, VLEVEL_L, "\n\r");
But for some reason I can only print int variables, why float doesn't work? And how can I print float variables aswell?
Thanks in advance!
2024-04-07 01:12 PM
>> .. why float doesn't work?
Not enabled,or limited/restricted library employed to reduce firmware foot print. Review project meta-data / settings.
Could make your own dtoa() / ftoa() implementation, or scale numbers to provide visibility desired.