mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-08 05:31:25 +00:00
Fixed customFontTableLookup
execution flow
This commit is contained in:
parent
2f4a2ccb2f
commit
377f909f36
@ -191,18 +191,6 @@ class Screen : public concurrency::OSThread
|
||||
SKIPREST = false;
|
||||
return ch;
|
||||
}
|
||||
else { // extended ASCII codes
|
||||
LASTCHAR = 0;
|
||||
SKIPREST = false;
|
||||
|
||||
// map UTF-8 cyrillic chars to it Windows-1251 (CP-1251) ASCII codes
|
||||
if (ch == 129) return (uint8_t)(168); // Ё
|
||||
if (ch == 145) return (uint8_t)(184); // ё
|
||||
if (ch > 143 && ch < 192) return (uint8_t)(ch + 48);
|
||||
if (ch > 127 && ch < 144) return (uint8_t)(ch + 112);
|
||||
|
||||
if (ch != 0xD0 && ch != 0xD1) return ch;
|
||||
}
|
||||
|
||||
uint8_t last = LASTCHAR; // get last char
|
||||
LASTCHAR = ch;
|
||||
@ -221,11 +209,13 @@ class Screen : public concurrency::OSThread
|
||||
// have empty chars for non-latin ASCII symbols
|
||||
case 0xD0: {
|
||||
SKIPREST = false;
|
||||
return (uint8_t)(0);
|
||||
if (ch == 129) return (uint8_t)(168); // Ё
|
||||
if (ch > 143 && ch < 192) return (uint8_t)(ch + 48);
|
||||
}
|
||||
case 0xD1: {
|
||||
SKIPREST = false;
|
||||
return (uint8_t)(0);
|
||||
if (ch == 145) return (uint8_t)(184); // ё
|
||||
if (ch > 127 && ch < 144) return (uint8_t)(ch + 112);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user