From 10926b54ec1cd5cf9d275c7f5d92d2bf6af286b5 Mon Sep 17 00:00:00 2001 From: Rob French Date: Sat, 6 Jun 2020 22:25:11 -0500 Subject: [PATCH] Further functioning, but with bugs. Top line is working, but clear there is messed up interplay between between how IOP updates its menu and sends it to the Raduino, and how the Raduino updates its display. Needs to be worked on. Issues: - After deselecting the I/O menu (i.e. should go back to normal Raduino top line), it never does. But the I/O menu is frozen. So clearly the top line never gets updated again by the Raduino. Need to understand the logic it uses to actually refresh the display. - Random garbage (black boxes) on the top line--intermittently. --- ubitx_20/cat_libs.ino | 10 +++++----- ubitx_20/ubitx_lcd_1602.ino | 10 +++++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ubitx_20/cat_libs.ino b/ubitx_20/cat_libs.ino index c5fd8af..1ced1e3 100644 --- a/ubitx_20/cat_libs.ino +++ b/ubitx_20/cat_libs.ino @@ -817,9 +817,9 @@ char iopMenuDisplay[17] = " "; // KC4UPR - these are used to delay the display of the Smeter, if the // IOP status has recently been displayed, to give time to see it. // Put these here because of how Arduino IDE puts .ino files together. -#define SMETER_DELAY_TIME 5000 -bool displaySmeter = true; -int delaySmeter; +//#define SMETER_DELAY_TIME 5000 +//bool displaySmeter = true; +//int delaySmeter; int delayTopLine = 0; int stateTopLine = 0; @@ -887,7 +887,7 @@ void Check_Cat(byte fromType) recvIOPMessage(msg, CAT_BUFF, readLength); // not super robust... if IOP ever sends more (or less) than a 5 (6) byte message // following assumes it's a status message, 4 chars (including trailing null, which I'm ignoring... switch(msg.id) { - case IOP_SSB_STATUS_MSG: + /*case IOP_SSB_STATUS_MSG: case IOP_DGT_STATUS_MSG: case IOP_CW_STATUS_MSG: case IOP_TEST_STATUS_MSG: @@ -896,7 +896,7 @@ void Check_Cat(byte fromType) iopStatusWindow[2] = msg.data[2]; displaySmeter = false; delaySmeter = millis() + SMETER_DELAY_TIME; - break; + break;*/ case IOP_MODE_REQUEST: iopSendMode(cwMode, isUSB, digiMode, isTest); diff --git a/ubitx_20/ubitx_lcd_1602.ino b/ubitx_20/ubitx_lcd_1602.ino index 2fc2da5..afb0da5 100644 --- a/ubitx_20/ubitx_lcd_1602.ino +++ b/ubitx_20/ubitx_lcd_1602.ino @@ -767,14 +767,18 @@ void idle_process() } } - if (!displaySmeter) { + if (stateTopLine > 0) { + return; + } + + /*if (!displaySmeter) { if (delaySmeter < millis()) { displaySmeter = true; } - } + }*/ //S-Meter Display - if (((displayOption1 & 0x08) == 0x08 && (sdrModeOn == 0)) && (++checkCountSMeter > SMeterLatency) && displaySmeter) + if (((displayOption1 & 0x08) == 0x08 && (sdrModeOn == 0)) && (++checkCountSMeter > SMeterLatency)) { int newSMeter;