void watch_display_character(uint8_t character, uint8_t position) {
#ifdef USE_CUSTOM_LCD
if (character == 'R') character = 'r'; // We can't display uppercase R on this display.
+ else if (character == 'T' && position > 1 && position < 8) character = 't'; // lowercase t is the only option for these positions
#else
// special cases for positions 4 and 6
if (position == 4 || position == 6) {
void watch_display_text(watch_position_t location, const char *string) {
switch (location) {
+ case WATCH_POSITION_TOP:
case WATCH_POSITION_TOP_LEFT:
watch_display_character(string[0], 0);
if (string[1]) {
}
break;
case WATCH_POSITION_FULL:
- default:
// This is deprecated, but we use it for the legacy behavior.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
(void)fallback;
switch (location) {
+ case WATCH_POSITION_TOP:
+ for (size_t i = 0; i < strlen(string); i++) {
+ if (i < 2) watch_display_character(string[i], i);
+ else if (i == 2) watch_display_character(string[i], 10);
+ else if (i < 5) watch_display_character(string[i], i - 1);
+ else break;
+ }
+ break;
case WATCH_POSITION_TOP_LEFT:
watch_display_character(string[0], 0);
if (string[1]) {
watch_display_text(location, string);
break;
case WATCH_POSITION_FULL:
- default:
// This is deprecated, but we use it for the legacy behavior.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
/// An enum listing the locations on the display where text can be placed.
typedef enum {
WATCH_POSITION_FULL = 0, ///< Display 10 characters to the full screen, in the standard F-91W layout.
+ WATCH_POSITION_TOP, ///< Display 2 (classic) or 5 (custom) characters at the top of the screen. On custom LCD, overwrites top right positon.
WATCH_POSITION_TOP_LEFT, ///< Display 2 or 3 characters in the top left of the screen.
WATCH_POSITION_TOP_RIGHT, ///< Display 2 digits in the top right of the screen.
WATCH_POSITION_BOTTOM, ///< Display 6 characters at the bottom of the screen, the main line.