diff options
| author | Michele Bini <michele.bini@gmail.com> | 2022-03-31 07:05:33 (GMT) |
|---|---|---|
| committer | Michele Bini <michele.bini@gmail.com> | 2022-03-31 07:05:33 (GMT) |
| commit | 8a0f738a027b758f253330d7171fd28ffe4f6162 (patch) | |
| tree | 41a9fe409002e247ce40595e152b5e799bdd24a2 | |
| parent | 12e938959eb1e2146fdec3fee7b9a304aa6889d2 (diff) | |
mix work
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.cpp | 8 | ||||
| -rw-r--r-- | src/displayapp/screens/WatchFaceDigital.h | 1 | ||||
| -rw-r--r-- | src/libs/lv_conf.h | 1 | ||||
| m--------- | src/libs/lvgl | 0 |
4 files changed, 9 insertions, 1 deletions
diff --git a/src/displayapp/screens/WatchFaceDigital.cpp b/src/displayapp/screens/WatchFaceDigital.cpp index 44421ff..9bf3541 100644 --- a/src/displayapp/screens/WatchFaceDigital.cpp +++ b/src/displayapp/screens/WatchFaceDigital.cpp @@ -195,6 +195,12 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app, lv_label_set_text_fmt(label_temp, "??°C"); lv_obj_align(label_temp, lv_scr_act(), LV_ALIGN_CENTER, 75, -75); + 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); @@ -307,7 +313,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 93719c1..62f4bcf 100644 --- a/src/displayapp/screens/WatchFaceDigital.h +++ b/src/displayapp/screens/WatchFaceDigital.h @@ -57,6 +57,7 @@ namespace Pinetime { DirtyValue<bool> motionSensorOk {}; DirtyValue<uint32_t> stepCount {}; DirtyValue<uint8_t> heartbeat {}; + DirtyValue<uint16_t> temperature {}; DirtyValue<bool> heartbeatRunning {}; DirtyValue<bool> notificationState {}; diff --git a/src/libs/lv_conf.h b/src/libs/lv_conf.h index dfec64a..2874253 100644 --- a/src/libs/lv_conf.h +++ b/src/libs/lv_conf.h @@ -417,6 +417,7 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in LV_FONT_DECLARE(neofont1) \ LV_FONT_DECLARE(neofont15) \ LV_FONT_DECLARE(neofont2) \ + LV_FONT_DECLARE(neofont3) \ LV_FONT_DECLARE(lv_font_sys_48) /* Enable it if you have fonts with a lot of characters. diff --git a/src/libs/lvgl b/src/libs/lvgl -Subproject 23430cf20e32294549fff9b2879a9466dacc19b +Subproject d2ea09a907e87c191dd050523a262c4ec1a863a |
