From 4fd35aea4f352a794b329251e529cb4461b782e4 Mon Sep 17 00:00:00 2001 From: Rob French Date: Sun, 20 Mar 2022 09:27:03 -0500 Subject: [PATCH] Fixed an existing issue with the CEC codebase. Specifically, if using a Nextion display, if EXTEND_KEY_GROUP1 was not set, then the checkButton() function that is compiled did not support the on-screen menu display for legacy uBITX options. The menus would still get activated, but would not display on the Nextion display. Added the #ifdef/#else for USE_SW_SERIAL to the "NOT" EXTEND_KEY_GROUP1 version of checkButton(). Note that there's nothing about this function that requires the keyer implementation. --- ubitx_20/ubitx.h | 7 +++---- ubitx_20/ubitx_20.ino | 10 +++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ubitx_20/ubitx.h b/ubitx_20/ubitx.h index 40e12a7..6b04d07 100644 --- a/ubitx_20/ubitx.h +++ b/ubitx_20/ubitx.h @@ -61,6 +61,7 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode //============================================================================== // User Select feather list //============================================================================== +/* //Enable all features #define FN_BAND 1 //592 #define FN_VFO_TOGGLE 1 //78 @@ -84,7 +85,7 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode #define FN_KEYTYPE 1 //168 #define FN_ADCMONITOR 1 //516 #define FN_TXONOFF 1 //58 - +*/ /* //Test Configuration (88%) #define FN_BAND 0 //592 @@ -110,7 +111,6 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode #define FN_ADCMONITOR 1 //516 #define FN_TXONOFF 1 //58 */ - /* //Recommended Character LCD Developer 87% #define FN_BAND 1 //592 @@ -137,7 +137,6 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode #define FN_TXONOFF 1 //58 */ -/* //Recommended for Nextion, TJC LCD 88% #define FN_BAND 1 //600 #define FN_VFO_TOGGLE 1 //90 @@ -161,7 +160,7 @@ extern byte I2C_LCD_SECOND_ADDRESS; //only using Dual LCD Mode #define FN_KEYTYPE 0 //294 #define FN_ADCMONITOR 0 //526 //not available with Nextion or Serial UI #define FN_TXONOFF 1 //70 -*/ + //============================================================================== // End of User Select Mode and Compil options //============================================================================== diff --git a/ubitx_20/ubitx_20.ino b/ubitx_20/ubitx_20.ino index f4cf62c..0aa917e 100644 --- a/ubitx_20/ubitx_20.ino +++ b/ubitx_20/ubitx_20.ino @@ -803,8 +803,16 @@ void checkButton(){ delay(50); if (!btnDown()) //debounce return; - + //for touch screen +#ifdef USE_SW_SERIAL + SetSWActivePage(1); + doMenu(); + + if (isCWAutoMode == 0) + SetSWActivePage(0); +#else doMenu(); +#endif //wait for the button to go up again while(btnDown()) {