remove first space from converted string
This commit is contained in:
parent
6b41f23d59
commit
a2e70d49f3
1 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,13 @@ void loop (void)
|
|||
mcusleepcycle=32; // sleep, wakeup every 32 cycles
|
||||
dtostrf(htu21d_temp , 6, 2, htu21d_temp_s );
|
||||
dtostrf(htu21d_hum , 6, 2, htu21d_hum_s );
|
||||
// remove space
|
||||
if(htu21d_temp_s[0]==' '){
|
||||
memcpy (htu21d_temp_s,htu21d_temp_s+1,strlen(htu21d_temp_s)+1);
|
||||
}
|
||||
if(htu21d_hum_s[0]==' '){
|
||||
memcpy (htu21d_hum_s,htu21d_hum_s+1,strlen(htu21d_hum_s)+1);
|
||||
}
|
||||
|
||||
// debug only
|
||||
// printf("Temp: %s",htu21d_temp_s);
|
||||
|
|
Loading…
Reference in a new issue