diff options
author | Joey Castillo <jose.castillo@gmail.com> | 2021-10-23 18:15:22 -0400 |
---|---|---|
committer | Joey Castillo <jose.castillo@gmail.com> | 2021-10-23 18:15:22 -0400 |
commit | c8041627ee540aba886144b528a9020f0e41e8da (patch) | |
tree | 7bbb95b4f5cd8e4178957401e682f3821260c7a3 | |
parent | 8475ffcd7aaebcbf17c7188ef96ce01a9730e9b3 (diff) | |
download | Sensor-Watch-c8041627ee540aba886144b528a9020f0e41e8da.tar.gz Sensor-Watch-c8041627ee540aba886144b528a9020f0e41e8da.tar.bz2 Sensor-Watch-c8041627ee540aba886144b528a9020f0e41e8da.zip |
movement temperature face: only enable thermistor when reading data
-rw-r--r-- | movement/watch_faces/thermistor/thermistor_readout_face.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/movement/watch_faces/thermistor/thermistor_readout_face.c b/movement/watch_faces/thermistor/thermistor_readout_face.c index 2a4ec3a1..5cee2e96 100644 --- a/movement/watch_faces/thermistor/thermistor_readout_face.c +++ b/movement/watch_faces/thermistor/thermistor_readout_face.c @@ -5,6 +5,7 @@ #include "watch.h" void _thermistor_readout_face_update_display(bool in_fahrenheit) { + thermistor_driver_enable(); float temperature_c = thermistor_driver_get_temperature(); char buf[14]; if (in_fahrenheit) { @@ -13,6 +14,7 @@ void _thermistor_readout_face_update_display(bool in_fahrenheit) { sprintf(buf, "%4.1f#C", temperature_c); } watch_display_string(buf, 4); + thermistor_driver_disable(); } void thermistor_readout_face_setup(movement_settings_t *settings, void ** context_ptr) { @@ -24,7 +26,6 @@ void thermistor_readout_face_activate(movement_settings_t *settings, void *conte (void) settings; (void) context; watch_display_string("TE", 0); - thermistor_driver_enable(); } bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *settings, void *context) { @@ -69,5 +70,4 @@ bool thermistor_readout_face_loop(movement_event_t event, movement_settings_t *s void thermistor_readout_face_resign(movement_settings_t *settings, void *context) { (void) settings; (void) context; - thermistor_driver_disable(); } |