Skip to content

Commit

Permalink
🐛 Fix FTDI Eve unicode and spinner dialog (MarlinFirmware#22468)
Browse files Browse the repository at this point in the history
  • Loading branch information
marciot authored and Night69 committed Aug 31, 2021
1 parent dfca3b4 commit 5edd958
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@

utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) {
utf8_char_t val = *(uint8_t*)c++;
if ((val & 0xC0) == 0x80)
if ((val & 0xC0) == 0xC0)
while ((*c & 0xC0) == 0x80)
val = (val << 8) | *(uint8_t*)c++;
return val;
}

utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) {
utf8_char_t val = *(uint8_t*)c++;
if ((val & 0xC0) == 0x80)
if ((val & 0xC0) == 0xC0)
while ((*c & 0xC0) == 0x80)
val = (val << 8) | *(uint8_t*)c++;
return val;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void SpinnerDialogBox::show(progmem_str message) {
void SpinnerDialogBox::hide() {
CommandProcessor cmd;
cmd.stop().execute();
GOTO_PREVIOUS();
}

void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) {
Expand All @@ -66,7 +67,6 @@ void SpinnerDialogBox::onIdle() {
if (mydata.auto_hide && !commandsInQueue()) {
mydata.auto_hide = false;
hide();
GOTO_PREVIOUS();
}
}

Expand Down

0 comments on commit 5edd958

Please sign in to comment.