watch_display_character(character, 7);
watch_clear_pixel(2, 10); // clear segment B of position 7 since it can't blink
+ slcd_disable();
+ slcd_set_blink_enabled(false);
+ slcd_configure_blink(false, 0x0F, 0x0F, 0);
+ slcd_set_blink_enabled(true);
+ slcd_enable();
+}
+
+void watch_start_indicator_blink_if_possible(watch_indicator_t indicator, uint32_t duration) {
+#ifdef USE_CUSTOM_LCD
+ uint8_t mask = 0;
+ switch (indicator) {
+ case WATCH_INDICATOR_COLON:
+ mask = 0b0001;
+ break;
+ case WATCH_INDICATOR_LAP:
+ mask = 0b0010;
+ break;
+ case WATCH_INDICATOR_BATTERY:
+ mask = 0b0100;
+ break;
+ case WATCH_INDICATOR_SLEEP:
+ mask = 0b1000;
+ break;
+ default:
+ return;
+ }
+ watch_set_indicator(indicator);
+
+ if (duration <= _slcd_fc_min_ms_bypass) {
+ slcd_configure_frame_counter(0, (duration / (1000 / _slcd_framerate)) - 1, false);
+ } else {
+ slcd_configure_frame_counter(0, ((duration / (1000 / _slcd_framerate)) / 8 - 1), true);
+ }
+ slcd_set_frame_counter_enabled(0, true);
+
+
+ slcd_disable();
slcd_set_blink_enabled(false);
- slcd_configure_blink(false, 0x07, 0x07, 0);
+ slcd_configure_blink(false, mask, 0, 0);
slcd_set_blink_enabled(true);
+ slcd_enable();
+#else
+ (void) indicator;
+ (void) duration;
+#endif
}
void watch_stop_blink(void) {
// 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.
+
+ // 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.
} watch_indicator_t;
/// An enum listing the locations on the display where text can be placed.
* @param character The character you wish to blink.
* @param duration The duration of the on/off cycle in milliseconds, from 50 to ~4250 ms.
* @note Segment B of position 7 cannot blink autonomously, so not all characters will work well.
- * Supported characters for blinking:
+ * Supported characters for blinking on classic LCD :
* * Punctuation: underscore, apostrophe, comma, hyphen, equals sign, tilde (top segment only)
* * Numbers: 5, 6, ampersand (lowercase 7)
* * Letters: b, C, c, E, F, h, i, L, l, n, o, S, t
+ * Supported characters for blinking on custom LCD :
+ * * Only the segments making up the capital letter 'C' (ADEF)
*/
void watch_start_character_blink(char character, uint32_t duration);
+/** @brief Blinks an indicator on the custom LCD.
+ * @details You can blink the LAP, ARROWS, SLEEP and COLON indicators on the custom LCD.
+ * Alas you cannot autonomously blink any indicators on the original F-91W LCD.
+ * @param indicator The indicator you wish to blink.
+ * @param duration The duration of the on/off cycle in milliseconds, from 50 to ~4250 ms.
+ */
+void watch_start_indicator_blink_if_possible(watch_indicator_t indicator, uint32_t duration);
+
/** @brief Stops and clears all blinking segments.
* @details This will stop all blinking in position 7, and clear all segments in that digit.
+ * On the Pro LCD, this will also stop the blinking of all indicators.
*/
void watch_stop_blink(void);