lcd显示温湿度美化格式

This commit is contained in:
james 2024-08-01 11:19:15 +08:00
parent f358a17211
commit f1e8e52a0d
1 changed files with 6 additions and 4 deletions

View File

@ -106,10 +106,12 @@ static int example_subscribe(void *handle)
void show_lcd()
{
sprintf(tmp, "Temp: %.3f", Temp);
lcd_show_string(10, 10, 24, tmp);
sprintf(tmp, "Humi: %.3f", Humi);
lcd_show_string(10, 10+24, 24, tmp);
lcd_show_string(10, 10, 24, "Temperature:");
sprintf(tmp, "%f", Temp);
lcd_show_string(10, 10+24, 32, tmp);
lcd_show_string(10, 10+24+32, 24, "Humidity:");
sprintf(tmp, "%f", Humi);
lcd_show_string(10, 10+24+32+24, 32, tmp);
}
void make_file()