]> git.earman.xyz Git - sensor-watch.git/commitdiff
Allow setting July 31st as today's date
authorEGS <edwardspeyer@users.noreply.github.com>
Wed, 31 Jul 2024 17:12:04 +0000 (18:12 +0100)
committerEGS <edwardspeyer@users.noreply.github.com>
Wed, 31 Jul 2024 17:17:04 +0000 (18:17 +0100)
To allow a valid date to be set the `set_time_face` cycles through the
valid days for a given month.  July was incorrectly encoded as having 30
days (it has 31!)

movement/watch_faces/settings/set_time_face.c

index 84a4d18c13b4896955b773b79d9cd4668fda8dc5..a8c88e44ab66db60c1e6c6508c77681d0eb1a899 100644 (file)
@@ -33,7 +33,7 @@ static bool _quick_ticks_running;
 
 static void _handle_alarm_button(movement_settings_t *settings, watch_date_time date_time, uint8_t current_page) {
     // handles short or long pressing of the alarm button
-    const uint8_t days_in_month[12] = {31, 28, 31, 30, 31, 30, 30, 31, 30, 31, 30, 31};
+    const uint8_t days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
     switch (current_page) {
         case 0: // hour