Fork of David Smart's RA8875 library

Fork of RA8875 by David Smart

Files at this revision

API Documentation at this revision

Comitter:
hexley
Date:
Thu Mar 13 17:24:45 2014 +0000
Parent:
45:679c2fb8480c
Commit message:
Fixes for vertical line wrap.

Changed in this revision

RA8875.cpp Show annotated file Show diff for this revision Revisions of this file
TextDisplay.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/RA8875.cpp	Mon Mar 10 23:53:40 2014 +0000
+++ b/RA8875.cpp	Thu Mar 13 17:24:45 2014 +0000
@@ -461,7 +461,7 @@
             loc_t y;
             y = ReadCommand(0x2C) | (ReadCommand(0x2D) << 8);   // current y location
             y += fontheight();
-            if (y > height())               // @TODO after bottom of active window, then scroll window?
+            if (y >= height())               // @TODO after bottom of active window, then scroll window? #### hb changed test to include = to fix dropped line in vertical wrap.
                 y = 0;
             WriteCommandW(0x2C, y);
         } else {
--- a/TextDisplay.cpp	Mon Mar 10 23:53:40 2014 +0000
+++ b/TextDisplay.cpp	Thu Mar 13 17:24:45 2014 +0000
@@ -37,7 +37,7 @@
     if(value == '\n') {
         _column = 0;
         _row++;
-        if(_row >= rows()) {
+        if(_row >= rows() ) {             // #### hb. Fix missing 18th row issue.
             _row = 0;
         }
     } else {
@@ -46,7 +46,7 @@
         if(_column >= columns()) {
             _column = 0;
             _row++;
-            if(_row >= rows()) {
+            if(_row >= rows() ) {        // #### hb. Fix missing 18th row issue.
                 _row = 0;
             }
         }