Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 8 months ago.
Re: N5110: printString() and printChar() updated so that strings/chars are cut-off after the 83rd
It is better to replace 83 by WIDTH-1
Question relating to:
1 Answer
9 years, 8 months ago.
Good idea. Was a quick fix to solve a bug. Will update soon and commit changes.
One more improvement to avoid flickering. A variable to disable refresh.
---------
- include "N5110.h"
bool lcdrefresh=true;
...
function to refresh the display
void N5110::refresh()
{
if (!lcdrefresh) return;
...
---------
Then we can use something like this:
lcdrefresh=false; lcd.clear(); lcd.printString(s1,0,0); lcd.printChar('$',39,0); lcd.printString(s2,WIDTH-strlen(s)*6+1,0); lcd.printString(s3,0,5); lcdrefresh=true; lcd.refresh();
posted by 24 Apr 2015