This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI-RTOS
example project: project zero, i2chdc2010(simplelink sensor and actuator plugin example)
copy Uartlog.c, Uartlog.h to project i2chdc2010 do display temperature and humidity using Uartlog
but the code does show any float data as 0.0000
Log_info2("%.2f DegC(Temp), %.2f %%RH(Humidity)", g_actualTemp, g_actualHumity);
to show the data correctly have to do workaround as the following:
int i_actualTemp = 0; int i_actualHumity = 0; i_actualTemp = g_actualTemp; i_actualHumity = g_actualHumity; Log_info4("%d.%2d DegC(Temp), %d.%2d %%RH(Humidity)", g_actualTemp, (g_actualTemp - i_actualTemp) * 100, g_actualHumity, (g_actualHumity - i_actualHumity) * 100);