From e0746e06f184bc4abc88ee5260963de03405f530 Mon Sep 17 00:00:00 2001 From: Joey Castillo Date: Mon, 12 May 2025 22:34:27 -0400 Subject: [PATCH] custom LCD now has an 'arrows' indicator instead of a battery --- watch-faces/clock/clock_face.c | 10 ++++++++-- watch-faces/sensor/activity_logging_face.c | 6 ++---- watch-library/hardware/watch/watch_slcd.c | 2 +- watch-library/shared/watch/watch_common_display.c | 8 ++++---- watch-library/shared/watch/watch_slcd.h | 6 +++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/watch-faces/clock/clock_face.c b/watch-faces/clock/clock_face.c index f120b109..ca56ece9 100644 --- a/watch-faces/clock/clock_face.c +++ b/watch-faces/clock/clock_face.c @@ -82,8 +82,14 @@ static void clock_indicate_pm(watch_date_time_t date_time) { } static void clock_indicate_low_available_power(clock_state_t *clock) { - // Set the LAP indicator if battery power is low - clock_indicate(WATCH_INDICATOR_LAP, clock->battery_low); + // Set the low battery indicator if battery power is low + if (watch_get_lcd_type() == WATCH_LCD_TYPE_CUSTOM) { + // interlocking arrows imply "exchange" the battery. + clock_indicate(WATCH_INDICATOR_ARROWS, clock->battery_low); + } else { + // LAP indicator on classic LCD is an adequate fallback. + clock_indicate(WATCH_INDICATOR_LAP, clock->battery_low); + } } static watch_date_time_t clock_24h_to_12h(watch_date_time_t date_time) { diff --git a/watch-faces/sensor/activity_logging_face.c b/watch-faces/sensor/activity_logging_face.c index d540c323..984d9a09 100644 --- a/watch-faces/sensor/activity_logging_face.c +++ b/watch-faces/sensor/activity_logging_face.c @@ -119,8 +119,7 @@ bool activity_logging_face_loop(movement_event_t event, void *context) { break; case EVENT_ALARM_LONG_PRESS: state->data_dump_idx = 0; - /// FIXME: Battery indicator is now Arrows indicator. - watch_set_indicator(WATCH_INDICATOR_BATTERY); + watch_set_indicator(WATCH_INDICATOR_ARROWS); movement_request_tick_frequency(4); watch_set_decimal_if_available(); // fall through @@ -146,8 +145,7 @@ bool activity_logging_face_loop(movement_event_t event, void *context) { state->data_dump_idx++; if (state->data_dump_idx >= MOVEMENT_NUM_DATA_POINTS) { state->data_dump_idx = -1; - /// FIXME: Battery indicator is now Arrows indicator. - watch_clear_indicator(WATCH_INDICATOR_BATTERY); + watch_clear_indicator(WATCH_INDICATOR_ARROWS); watch_clear_decimal_if_available(); movement_request_tick_frequency(1); state->display_index = 0; diff --git a/watch-library/hardware/watch/watch_slcd.c b/watch-library/hardware/watch/watch_slcd.c index 731f4c53..4c591d9e 100644 --- a/watch-library/hardware/watch/watch_slcd.c +++ b/watch-library/hardware/watch/watch_slcd.c @@ -248,7 +248,7 @@ void watch_start_indicator_blink_if_possible(watch_indicator_t indicator, uint32 case WATCH_INDICATOR_LAP: mask = 0b0010; break; - case WATCH_INDICATOR_BATTERY: + case WATCH_INDICATOR_ARROWS: mask = 0b0100; break; case WATCH_INDICATOR_SLEEP: diff --git a/watch-library/shared/watch/watch_common_display.c b/watch-library/shared/watch/watch_common_display.c index 9332bcee..003f2705 100644 --- a/watch-library/shared/watch/watch_common_display.c +++ b/watch-library/shared/watch/watch_common_display.c @@ -36,8 +36,8 @@ uint32_t IndicatorSegments[7] = { SLCD_SEGID(2, 16), // WATCH_INDICATOR_24H SLCD_SEGID(1, 10), // WATCH_INDICATOR_LAP - // Aliases for indicators unavailable on the original F-91W LCD - SLCD_SEGID(1, 10), // WATCH_INDICATOR_BATTERY (same as LAP) + // Placeholders for indicators unavailable on the original F-91W LCD + SLCD_SEGID(4, 0), // WATCH_INDICATOR_ARROWS (does not exist, will set in SDATAL4 which is harmless) SLCD_SEGID(4, 0) // WATCH_INDICATOR_SLEEP (does not exist, will set in SDATAL4 which is harmless) }; @@ -374,7 +374,7 @@ void watch_clear_all_indicators(void) { watch_clear_indicator(WATCH_INDICATOR_PM); watch_clear_indicator(WATCH_INDICATOR_24H); watch_clear_indicator(WATCH_INDICATOR_LAP); - watch_clear_indicator(WATCH_INDICATOR_BATTERY); + watch_clear_indicator(WATCH_INDICATOR_ARROWS); watch_clear_indicator(WATCH_INDICATOR_SLEEP); } @@ -385,7 +385,7 @@ void _watch_update_indicator_segments(void) { IndicatorSegments[2] = SLCD_SEGID(3, 21); // WATCH_INDICATOR_PM IndicatorSegments[3] = SLCD_SEGID(2, 21); // WATCH_INDICATOR_24H IndicatorSegments[4] = SLCD_SEGID(1, 0); // WATCH_INDICATOR_LAP - IndicatorSegments[5] = SLCD_SEGID(2, 0); // WATCH_INDICATOR_BATTERY + IndicatorSegments[5] = SLCD_SEGID(2, 0); // WATCH_INDICATOR_ARROWS IndicatorSegments[6] = SLCD_SEGID(3, 0); // WATCH_INDICATOR_SLEEP } } diff --git a/watch-library/shared/watch/watch_slcd.h b/watch-library/shared/watch/watch_slcd.h index 76ba34ee..a129c6e7 100644 --- a/watch-library/shared/watch/watch_slcd.h +++ b/watch-library/shared/watch/watch_slcd.h @@ -52,11 +52,11 @@ typedef enum { WATCH_INDICATOR_BELL, ///< The small bell indicating that an alarm is set. WATCH_INDICATOR_PM, ///< The PM indicator, indicating that a time is in the afternoon. WATCH_INDICATOR_24H, ///< The 24H indicator, indicating that the watch is in a 24-hour mode. - WATCH_INDICATOR_LAP, ///< The LAP indicator; the F-91W uses this in its stopwatch UI. + WATCH_INDICATOR_LAP, ///< The LAP indicator; the F-91W uses this in its stopwatch UI. On custom LCD it's a looped arrow. // These next indicators are only available on the new custom LCD: - WATCH_INDICATOR_BATTERY, ///< The battery indicator. Will fall back to the LAP icon on the original F-91W LCD. - WATCH_INDICATOR_SLEEP, ///< The sleep indicator. No fallback here; use the tick animation to indicate sleep. + WATCH_INDICATOR_ARROWS, ///< The interlocking arrows indicator; indicates data transfer, or can signal to change the battery. + WATCH_INDICATOR_SLEEP, ///< The sleep indicator. // You can generally address the colon using dedicated functions, but it's also available here if needed. WATCH_INDICATOR_COLON, ///< The colon between hours and minutes.