mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-22 23:56:13 +01:00
Bugfix LCD showed random characters in SCROLLMODE 2
This commit is contained in:
parent
ce12f3b6c5
commit
27ba551986
15
Display.cpp
15
Display.cpp
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* © 2021, Chris Harlow, Neil McKechnie. All rights reserved.
|
||||
* © 2023, Harald Barth.
|
||||
*
|
||||
* This file is part of CommandStation-EX
|
||||
*
|
||||
|
@ -52,7 +53,7 @@ Display::Display(DisplayDevice *deviceDriver) {
|
|||
_deviceDriver = deviceDriver;
|
||||
// Get device dimensions in characters (e.g. 16x2).
|
||||
numCharacterColumns = _deviceDriver->getNumCols();
|
||||
numCharacterRows = _deviceDriver->getNumRows();;
|
||||
numCharacterRows = _deviceDriver->getNumRows();
|
||||
for (uint8_t row = 0; row < MAX_CHARACTER_ROWS; row++)
|
||||
rowBuffer[row][0] = '\0';
|
||||
topRow = ROW_INITIAL; // loop2 will fill from row 0
|
||||
|
@ -173,16 +174,18 @@ bool Display::findNextNonBlankRow() {
|
|||
rowNext = 0;
|
||||
else
|
||||
rowNext = rowNext + 1;
|
||||
if (rowNext >= MAX_CHARACTER_ROWS) rowNext = ROW_INITIAL;
|
||||
#if SCROLLMODE == 1
|
||||
// Finished if we've looped back to start
|
||||
if (rowNext == ROW_INITIAL) {
|
||||
if (rowNext >= MAX_CHARACTER_ROWS) {
|
||||
// Finished if we've looped back to start
|
||||
rowNext = ROW_INITIAL;
|
||||
noMoreRowsToDisplay = true;
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
// Finished if we're back to the first one shown
|
||||
if (rowNext >= MAX_CHARACTER_ROWS)
|
||||
rowNext = 0;
|
||||
if (rowNext == rowFirst) {
|
||||
// Finished if we're back to the first one shown
|
||||
noMoreRowsToDisplay = true;
|
||||
return false;
|
||||
}
|
||||
|
@ -193,4 +196,4 @@ bool Display::findNextNonBlankRow() {
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define GITHUB_SHA "devel-202303101548Z"
|
||||
#define GITHUB_SHA "devel-202303141949Z"
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
#include "StringFormatter.h"
|
||||
|
||||
|
||||
#define VERSION "4.2.26"
|
||||
#define VERSION "4.2.27"
|
||||
// 4.2.27 - Bugfix LCD showed random characters in SCROLLMODE 2
|
||||
// 4.2.26 - EX-IOExpander device driver enhancements
|
||||
// - Enhance I2C error checking
|
||||
// - Introduce delays to _loop to allow room for other I2C device comms
|
||||
|
|
Loading…
Reference in New Issue
Block a user