I sometimes get garbled text when using f.ex.
lcd.DisplayStringAt(0, LINE(5), (uint8_t *)my_str, CENTER_MODE);
Sometimes the text is cut short.
Please see attached image. This is probably user error somehow but I don't know how to make DisplayString work reliably. The garbling does not happen every time and some runs (after hw reset, button) run just fine, text is ok. Then next ones show the garbled text.
I am puzzled. Please see attached images, showing OK text, cut text?? and garbled text and garbled as zoomed.
My code snippet
...
lcd.Clear(LCD_COLOR_BLACK);
lcd.SetBackColor(LCD_COLOR_BLACK);
lcd.SetTextColor(LCD_COLOR_WHITE);
lcd.SetFont(&Font16);
wait(3);
pc.printf("Starting... \r\n");
wp=&DataBuffer[0];
old_wp=&DataBuffer[0];
lcd.ClearStringLine(5);
success=snprintf(my_str, 50,"\0");
lcd.DisplayStringAt(0, LINE(5), (uint8_t *)my_str, CENTER_MODE);
wait_ms(1);
lcd.ClearStringLine(5);
success=snprintf(my_str, 50,"Starting in 3... \0\0\0");
lcd.DisplayStringAt(0, LINE(5), (uint8_t *)my_str, CENTER_MODE);
wait_ms(1000);
lcd.ClearStringLine(5);
success=snprintf(my_str, 50,"Starting in 2... \0\0\0");
lcd.DisplayStringAt(0, LINE(5), (uint8_t *)my_str, CENTER_MODE);
wait_ms(1000);
...
I sometimes get garbled text when using f.ex.
lcd.DisplayStringAt(0, LINE(5), (uint8_t *)my_str, CENTER_MODE);
Sometimes the text is cut short.
Please see attached image. This is probably user error somehow but I don't know how to make DisplayString work reliably. The garbling does not happen every time and some runs (after hw reset, button) run just fine, text is ok. Then next ones show the garbled text.
I am puzzled. Please see attached images, showing OK text, cut text?? and garbled text and garbled as zoomed.
My code snippet