diff options
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.cpp | 8 | ||||
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index f7a7aa3..44af905 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -199,6 +199,12 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app, lv_label_set_text_fmt(label_temp, "??°C"); lv_obj_align(label_temp, nullptr, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); + label_temp = lv_label_create(lv_scr_act(), nullptr); + lv_obj_align(label_temp, lv_scr_act(), LV_ALIGN_CENTER, 0, -60); + lv_obj_set_style_local_text_color( label_temp, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999)); + lv_obj_set_style_local_text_font( label_temp, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &neofont1); + lv_label_set_text_fmt(label_temp, "T? [?,?]"); + label_time = lv_label_create(lv_scr_act(), nullptr); lv_obj_set_style_local_text_font(label_time, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &neofont3); lv_label_set_text_fmt(label_time, hhmm_label_text); @@ -340,7 +346,7 @@ void WatchFaceDigital::Refresh() { } #ifndef INFINISIM - temperature = systemTask.motionSensor.getTemperature(); + temperature = systemTask.motionSensor.temperature_last_read_value+23; if (temperature.IsUpdated()) { lv_obj_set_style_local_text_color( label_temp, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, lv_color_hex(0x999999)); lv_label_set_text_fmt(label_temp, "%d°C"); diff --git a/src/displayapp/screens/WatchFaceDigital.h b/src/displayapp/screens/WatchFaceDigital.h index 353a7fc..8d5bc8d 100644 --- a/src/displayapp/screens/WatchFaceDigital.h +++ b/src/displayapp/screens/WatchFaceDigital.h @@ -59,6 +59,7 @@ namespace Pinetime { DirtyValue<bool> motionSensorOk {}; DirtyValue<uint32_t> stepCount {}; DirtyValue<uint8_t> heartbeat {}; + DirtyValue<uint16_t> temperature {}; DirtyValue<bool> heartbeatRunning {}; DirtyValue<bool> notificationState {}; |
