Merge PR #417 - improve 24h only mode
Enhances 24 hour only mode by setting defaults properly and skipping past the 12/24 hour settings page in the preferences watch face. Reviewed-by: Matheus Afonso Martins Moreira <matheus@matheusmoreira.com> GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/417
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
#include "preferences_face.h"
|
||||
#include "watch.h"
|
||||
|
||||
#define PREFERENCES_FACE_NUM_PREFEFENCES (7)
|
||||
const char preferences_face_titles[PREFERENCES_FACE_NUM_PREFEFENCES][11] = {
|
||||
#define PREFERENCES_FACE_NUM_PREFERENCES (7)
|
||||
const char preferences_face_titles[PREFERENCES_FACE_NUM_PREFERENCES][11] = {
|
||||
"CL ", // Clock: 12 or 24 hour
|
||||
"BT Beep ", // Buttons: should they beep?
|
||||
"TO ", // Timeout: how long before we snap back to the clock face?
|
||||
@@ -65,7 +65,7 @@ bool preferences_face_loop(movement_event_t event, movement_settings_t *settings
|
||||
movement_move_to_next_face();
|
||||
return false;
|
||||
case EVENT_LIGHT_BUTTON_DOWN:
|
||||
current_page = (current_page + 1) % PREFERENCES_FACE_NUM_PREFEFENCES;
|
||||
current_page = (current_page + 1) % PREFERENCES_FACE_NUM_PREFERENCES;
|
||||
*((uint8_t *)context) = current_page;
|
||||
break;
|
||||
case EVENT_ALARM_BUTTON_UP:
|
||||
@@ -99,7 +99,9 @@ bool preferences_face_loop(movement_event_t event, movement_settings_t *settings
|
||||
default:
|
||||
return movement_default_loop_handler(event, settings);
|
||||
}
|
||||
|
||||
#ifdef CLOCK_FACE_24H_ONLY
|
||||
if (current_page == 0) current_page++; // Skips past 12/24HR mode
|
||||
#endif
|
||||
watch_display_string((char *)preferences_face_titles[current_page], 0);
|
||||
|
||||
// blink active setting on even-numbered quarter-seconds
|
||||
|
||||
Reference in New Issue
Block a user