]> git.earman.xyz Git - sensor-watch.git/commitdiff
show temperature and battery voltage in low energy mode
authorjoeycastillo <joeycastillo@utexas.edu>
Fri, 25 Aug 2023 18:20:00 +0000 (14:20 -0400)
committerjoeycastillo <joeycastillo@utexas.edu>
Fri, 25 Aug 2023 19:44:33 +0000 (15:44 -0400)
movement/watch_faces/demo/voltage_face.c
movement/watch_faces/sensor/thermistor_readout_face.c

index 51ed9ccbb3e38f6374c8ec85d7320bd2455d664e..d224851be5c2de3e36144979d5c5f58fbe63a8c2 100644 (file)
@@ -68,8 +68,17 @@ bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, vo
             }
             break;
         case EVENT_LOW_ENERGY_UPDATE:
-            watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
-            watch_display_string("BA  SLEEP ", 0);
+            // clear seconds area and start tick animation if necessary
+            if (!watch_tick_animation_is_running()) {
+                watch_display_string("  ", 8);
+                watch_start_tick_animation(1000);
+            }
+            // update once an hour
+            if (date_time.unit.minute == 0) {
+                watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
+                _voltage_face_update_display();
+                watch_display_string("  ", 8);
+            }
             break;
         default:
             movement_default_loop_handler(event, settings);
index 8a78f73a1f170b0e909d17eb2299d3278a69a12e..2b8ea18da8348c34c66103ef97ef9f36c4533e52 100644 (file)
@@ -77,7 +77,17 @@ bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *s
             }
             break;
         case EVENT_LOW_ENERGY_UPDATE:
-            watch_display_string("TE  SLEEP ", 0);
+            // clear seconds area and start tick animation if necessary
+            if (!watch_tick_animation_is_running()) {
+                watch_display_string("  ", 8);
+                watch_start_tick_animation(1000);
+            }
+            // update every 5 minutes
+            if (date_time.unit.minute % 5 == 0) {
+                watch_clear_indicator(WATCH_INDICATOR_SIGNAL);
+                _thermistor_readout_face_update_display(settings->bit.use_imperial_units);
+                watch_display_string("  ", 8);
+            }
             break;
         default:
             movement_default_loop_handler(event, settings);