I want to use os_sprintf function to convert float to string ,why not support "%f" or "%10.3f", the code like this :
measureValue = 23451.123;
os_sprintf( measureValStr, "%f", measureValue );
os_sprintf( tempStr, " kWh");
strcat( measureValStr, tempStr );
os_printf(" measure str is %s \n", measureValStr);
but the result is " %f kWh" , why not support this format ?
I want to use C API sprintf, but compile error
Need your help, thanks.
Who is online
Users browsing this forum: MSN [Bot] and 7 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!