aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drv_MatrixOrbital.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drv_MatrixOrbital.c b/drv_MatrixOrbital.c
index fce549b..5f6fd15 100644
--- a/drv_MatrixOrbital.c
+++ b/drv_MatrixOrbital.c
@@ -58,7 +58,7 @@ static char Name[] = "MatrixOrbital";
static int Model;
static int Protocol;
-static char dispBuffer[2][16];
+static char dispBuffer[4][20];
typedef struct {
int type;
@@ -101,6 +101,7 @@ static MODEL Models[] = {
{0x38, "LK204-24-USB", 4, 20, 8, 8, 2},
{0x39, "VK204-24-USB", 4, 20, 8, 8, 2},
{0x40, "DE-LD011", 2, 16, 0, 0, 3}, /* Sure electronics USB LCD board Rev.I */
+ {0x41, "DE-LD021", 4, 20, 0, 0, 3},
{0xff, "Unknown", -1, -1, 0, 0, 0}
};
@@ -118,7 +119,7 @@ static void drv_MO_write(const int row, const int col, const char *data, const i
cmd[3] = (char) row + 1;
strncpy(&(dispBuffer[row][col]), data, len);
drv_generic_serial_write(cmd, 4);
- drv_generic_serial_write(dispBuffer[row], 16);
+ drv_generic_serial_write(dispBuffer[row], Models[Model].cols);
} else {
cmd[2] = (char) col + 1;
cmd[3] = (char) row + 1;
@@ -142,15 +143,12 @@ static void drv_MO_clear(void)
case 3:
/* Sure electronics USB LCD board - clear buffer */
- for (i = 0; i < 2; i++) {
- for (j = 0; j < 16; j++) {
+ for (i = 0; i < Models[Model].rows; i++) {
+ for (j = 0; j < Models[Model].cols; j++) {
dispBuffer[i][j] = ' ';
}
+ drv_MO_write(1, i + 1, dispBuffer[i], Models[Model].cols);
}
-
- drv_MO_write(1, 1, dispBuffer[0], 16);
- drv_MO_write(1, 2, dispBuffer[1], 16);
-
break;
}
}
@@ -329,8 +327,8 @@ static int drv_MO_start(const char *section, const int quiet)
if (Models[i].protocol == 3) { // Sure electronics USB LCD board - full line output
int i, j;
- for (i = 0; i < 2; i++) { // Clear buffer
- for (j = 0; j < 16; j++) {
+ for (i = 0; i < Models[i].rows; i++) { // Clear buffer
+ for (j = 0; j < Models[i].cols; j++) {
dispBuffer[i][j] = ' ';
}
}
4fa1ff7fad37751a5b0e3163a475&follow=1'>New Upstream Snapshot (commit d26b627)Jonathan McCrohan1-0/+10 2014-10-15Imported Upstream version 0+git20141009.d26b627upstream/0+git20141009.d26b627Jonathan McCrohan2010-11120/+159271 2014-07-23Release 0+git20140611.14bd6c7-1debian/0+git20140611.14bd6c7-1Jonathan McCrohan1-2/+2 2014-07-23New Upstream Snapshot (commit 14bd6c7)Jonathan McCrohan1-2/+3 2014-07-23Imported Upstream version 0+git20140611.14bd6c7upstream/0+git20140611.14bd6c7Jonathan McCrohan7-11/+60 2014-05-13New Upstream Snapshot (commit 1246b27)Jonathan McCrohan1-0/+6 2014-05-13Imported Upstream version 0+git20140512.1246b27upstream/0+git20140512.1246b27Jonathan McCrohan391-301/+3983 2014-04-05Release 0+git20140326.cfc2975-1debian/0+git20140326.cfc2975-1Jonathan McCrohan1-2/+2 2014-04-05d/control: update Homepage (upstream has moved from Gitweb to cgit)Jonathan McCrohan2-1/+2 2014-04-05New Upstream Snapshot (commit cfc2975)Jonathan McCrohan1-0/+6 2014-04-05Imported Upstream version 0+git20140326.cfc2975upstream/0+git20140326.cfc2975Jonathan McCrohan118-656/+877 2014-01-16Release 0+git20140107.1850cf8-1debian/0+git20140107.1850cf8-1Jonathan McCrohan1-2/+2 2014-01-16Update Standards Version to 3.9.5Jonathan McCrohan2-1/+9 No changes required