From 02c3986d3a47634629da1a243bf95655262d6369 Mon Sep 17 00:00:00 2001 From: Administrator Date: Wed, 2 Nov 2016 09:06:25 +0000 Subject: [PATCH] Update hd44780.c --- server/drivers/hd44780.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server/drivers/hd44780.c b/server/drivers/hd44780.c index 23f89ad..42dea2b 100644 --- a/server/drivers/hd44780.c +++ b/server/drivers/hd44780.c @@ -624,7 +624,7 @@ HD44780_position(Driver *drvthis, int x, int y) } //p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION | DDaddr); - p->hd44780_functions->senddata(p, dispID, RS_INSTR, 0x80); + p->hd44780_functions->senddata(p, dispID, RS_INSTR, POSITION); p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */ p->hd44780_functions->senddata(p, dispID, RS_INSTR, relY); @@ -699,11 +699,15 @@ HD44780_flush(Driver *drvthis) /* there are differences, ... */ if (sp <= ep) { for (drawing = 0; sp <= ep; x++, sp++, sq++) { + /* x%8 is for 16x1 displays only ! */ - if (!drawing || (p->dispSizes[dispID-1] == 1 && p->width == 16 && (x % 8 == 0))) { - drawing = 1; - HD44780_position(drvthis,x,y); - } + // if (!drawing || (p->dispSizes[dispID-1] == 1 && p->width == 16 && (x % 8 == 0))) { + // drawing = 1; + // HD44780_position(drvthis,x,y); + // } + + // 40X4 fix? + HD44780_position(drvthis,x,y); p->hd44780_functions->senddata(p, dispID, RS_DATA, *sp); p->hd44780_functions->uPause(p, 40); /* Minimum exec time for all commands */ *sq = *sp; /* Update backing store */