Rough pass expanding print

This commit is contained in:
Ben V. Brown
2021-03-16 20:42:47 +11:00
parent e6eb3e34bc
commit 3858ac4a16
2 changed files with 13 additions and 3 deletions

View File

@@ -236,8 +236,17 @@ void OLED::setRotation(bool leftHanded) {
// print a string to the current cursor location
void OLED::print(const char *str) {
uint16_t cache = 0;
while (str[0]) {
if (str[0] >= 0xF0) {
cache = static_cast<uint16_t>(str[0] & 0x0F) << 8;
} else if (cache != 0) {
cache |= str[0];
drawChar(cache);
cache = 0;
} else {
drawChar(str[0]);
}
str++;
}
}

View File

@@ -1,4 +1,5 @@
#!/bin/bash
set -x
TRANSLATION_DIR="../Translations"
TRANSLATION_SCRIPT="make_translation.py"