summaryrefslogtreecommitdiffstats
path: root/movement/watch_faces/complications/sunrise_sunset_face.h
diff options
context:
space:
mode:
authorJoey Castillo <joeycastillo@utexas.edu>2022-01-21 11:25:43 -0500
committerJoey Castillo <joeycastillo@utexas.edu>2022-01-21 11:25:43 -0500
commita21ad54aac11fa2624105ba0a203808416d228be (patch)
tree48dc1d11b1c0595494fa28eb4d72aa03404e4588 /movement/watch_faces/complications/sunrise_sunset_face.h
parent68f17c89705ac3b4e6c685807d8e799684e2b136 (diff)
downloadSensor-Watch-a21ad54aac11fa2624105ba0a203808416d228be.tar.gz
Sensor-Watch-a21ad54aac11fa2624105ba0a203808416d228be.tar.bz2
Sensor-Watch-a21ad54aac11fa2624105ba0a203808416d228be.zip
movement: simple UI for entering wearer location
Diffstat (limited to 'movement/watch_faces/complications/sunrise_sunset_face.h')
-rw-r--r--movement/watch_faces/complications/sunrise_sunset_face.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/movement/watch_faces/complications/sunrise_sunset_face.h b/movement/watch_faces/complications/sunrise_sunset_face.h
index b73c18fb..196b9db0 100644
--- a/movement/watch_faces/complications/sunrise_sunset_face.h
+++ b/movement/watch_faces/complications/sunrise_sunset_face.h
@@ -31,8 +31,20 @@
// TODO: It also functions as an interface for setting the location register, which other watch faces can use for various purposes.
typedef struct {
- uint16_t latitude;
- uint16_t longitude;
+ uint8_t sign: 1; // 0-1
+ uint8_t hundreds: 1; // 0-1, ignored for latitude
+ uint8_t tens: 4; // 0-9 (must wrap at 10)
+ uint8_t ones: 4; // 0-9 (must wrap at 10)
+ uint8_t tenths: 4; // 0-9 (must wrap at 10)
+ uint8_t hundredths: 4; // 0-9 (must wrap at 10)
+} sunrise_sunset_lat_lon_settings_t;
+
+typedef struct {
+ uint8_t page;
+ uint8_t active_digit;
+ bool location_changed;
+ sunrise_sunset_lat_lon_settings_t working_latitude;
+ sunrise_sunset_lat_lon_settings_t working_longitude;
} sunrise_sunset_state_t;
void sunrise_sunset_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);