Revert "Avoid out-of-range character"
This commit is contained in:
parent
1dc826d295
commit
d5704891ef
@ -43,8 +43,6 @@ uint8_t IndicatorSegments[8] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void watch_display_character(uint8_t character, uint8_t position) {
|
void watch_display_character(uint8_t character, uint8_t position) {
|
||||||
if((character-0x20 < 0) | (character-0x20 >= sizeof(Classic_LCD_Character_Set)) return ;
|
|
||||||
|
|
||||||
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CUSTOM) {
|
if (watch_get_lcd_type() == WATCH_LCD_TYPE_CUSTOM) {
|
||||||
if (character == 'R' && position > 1 && position < 8) character = 'r'; // We can't display uppercase R in these positions
|
if (character == 'R' && position > 1 && position < 8) character = 'r'; // We can't display uppercase R in these positions
|
||||||
else if (character == 'T' && position > 1 && position < 8) character = 't'; // lowercase t is the only option for these positions
|
else if (character == 'T' && position > 1 && position < 8) character = 't'; // lowercase t is the only option for these positions
|
||||||
@ -127,9 +125,9 @@ void watch_display_character(uint8_t character, uint8_t position) {
|
|||||||
|
|
||||||
void watch_display_character_lp_seconds(uint8_t character, uint8_t position) {
|
void watch_display_character_lp_seconds(uint8_t character, uint8_t position) {
|
||||||
// Will only work for digits and for positions 8 and 9 - but less code & checks to reduce power consumption
|
// Will only work for digits and for positions 8 and 9 - but less code & checks to reduce power consumption
|
||||||
|
|
||||||
digit_mapping_t segmap;
|
digit_mapping_t segmap;
|
||||||
uint8_t segdata;
|
uint8_t segdata;
|
||||||
if(character < 20) return ;
|
|
||||||
|
|
||||||
/// TODO: See optimization note above.
|
/// TODO: See optimization note above.
|
||||||
|
|
||||||
@ -171,7 +169,6 @@ void watch_display_string(const char *string, uint8_t position) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void watch_display_text(watch_position_t location, const char *string) {
|
void watch_display_text(watch_position_t location, const char *string) {
|
||||||
if(!string[0]) return ;
|
|
||||||
switch (location) {
|
switch (location) {
|
||||||
case WATCH_POSITION_TOP:
|
case WATCH_POSITION_TOP:
|
||||||
case WATCH_POSITION_TOP_LEFT:
|
case WATCH_POSITION_TOP_LEFT:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user