diff --git a/main.c b/main.c index 363b670..5f0f63a 100644 --- a/main.c +++ b/main.c @@ -239,14 +239,16 @@ static void vfd_digit(uint8_t nb, char c) if (false) { // add the comma (not encoded) vfd_data[1] |= (1<<(16)); } - - if (((c&0x7f)<' ') || ((c&0x7f)>' '+LENGTH(ascii_7segments)-1)) { // unknown ASCII character - vfd_data[1] = 0; // add empty segments to memory - } else { - vfd_data[1] |= (ascii_7segments[c-' ']<<(17)); // add encoded segments to memory - } - vfd_data[2] = 0; + c &= 0x7f; // only take the ASCII part + if (c>=' ') { // only take printable characters + uint8_t i = c-' '; // get index for character + if (i=' ')) { // only take printable characters + uint8_t i = c-' '; // get index for character if (i0x7f) { // the non ASCII character are used for pictures + uint8_t i = c-0x80; // get index for character if (i