mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 18:12:07 +00:00
Removed prefix chars, fixed issues related to custom font mappings
This commit is contained in:
parent
2530dc44c7
commit
e3bcb87cf0
@ -717,7 +717,7 @@ void DebugInfo::drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char *fields[] = {channelStr, nullptr};
|
const char *fields[] = {channelStr, nullptr};
|
||||||
uint32_t yo = drawRows(display, x, y + 12, fields);
|
uint32_t yo = drawRows(display, x, y + FONT_HEIGHT, fields);
|
||||||
|
|
||||||
display->drawLogBuffer(x, yo);
|
display->drawLogBuffer(x, yo);
|
||||||
}
|
}
|
||||||
|
@ -168,13 +168,16 @@ class Screen : public PeriodicTask
|
|||||||
switch (last) { // conversion depnding on first UTF8-character
|
switch (last) { // conversion depnding on first UTF8-character
|
||||||
case 0xC2: { SKIPREST = false; return (uint8_t) ch; }
|
case 0xC2: { SKIPREST = false; return (uint8_t) ch; }
|
||||||
case 0xC3: { SKIPREST = false; return (uint8_t) (ch | 0xC0); }
|
case 0xC3: { SKIPREST = false; return (uint8_t) (ch | 0xC0); }
|
||||||
case 0x82: { SKIPREST = false; if (ch == 0xAC) return (uint8_t) 0x80; } // special case Euro-symbol
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We want to strip out prefix chars for two-byte char formats
|
||||||
|
if (ch == 0xC2 || ch == 0xC3 || ch == 0x82) return (uint8_t) 0;
|
||||||
|
|
||||||
// If we already returned an unconvertable-character symbol for this unconvertable-character sequence, return NULs for the rest of it
|
// If we already returned an unconvertable-character symbol for this unconvertable-character sequence, return NULs for the rest of it
|
||||||
if (SKIPREST) return (uint8_t) 0;
|
if (SKIPREST) return (uint8_t) 0;
|
||||||
SKIPREST = true;
|
SKIPREST = true;
|
||||||
|
|
||||||
return (uint8_t) 0xA8; // otherwise: return ¿ if character can't be converted
|
return (uint8_t) 191; // otherwise: return ¿ if character can't be converted (note that the font map we're using doesn't stick to standard EASCII codes)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a handle to the DebugInfo screen.
|
/// Returns a handle to the DebugInfo screen.
|
||||||
|
Loading…
Reference in New Issue
Block a user