kopia lustrzana https://github.com/g7uhn/ft817_buddy
OK EEPROM writes while developing this branch
rodzic
0102d54cf3
commit
a5967f6132
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
// uncomment the line below if you want to use this sketch that writes to the EEPROM and accept the responsibility stated above! :-)
|
||||
//#define EEPROM_WRITES
|
||||
#define EEPROM_WRITES
|
||||
|
||||
// Include libraries
|
||||
#include <Arduino.h> // required for PlatformIO IDE (not required if you're using Arduino IDE)
|
||||
|
@ -60,7 +60,8 @@ bool sw7status = 1; // using pullup, pressing button takes this low
|
|||
bool sw8status = 1; // using pullup, pressing button takes this low
|
||||
bool sw9status = 1; // using pullup, pressing button takes this low
|
||||
bool backlightStatus = 0; // Backlight, initialises as OFF
|
||||
bool timedBacklight = 0;
|
||||
bool timedBacklight = 0; // is the Buddy performing a timed backlight operation?
|
||||
bool expansionPage = 0; // is the Buddy displaying the expansion page?
|
||||
int backlightCounter = 0;
|
||||
long freq;
|
||||
String mode;
|
||||
|
@ -453,7 +454,19 @@ void drawMainDisplay()
|
|||
// Cycle through soft-key pages
|
||||
void changePage()
|
||||
{
|
||||
currentPage = ++currentPage % 3; // 2 pages
|
||||
if (sw9status == LOW) { // if SHIFT key is down, draw the location/time page
|
||||
expansionPage = 1;
|
||||
display.clearDisplay();
|
||||
display.setCursor(10, 11);
|
||||
display.println("Placeholder");
|
||||
display.println("for GPS info");
|
||||
}
|
||||
else {
|
||||
if (expansionPage != 1) { // if we're not on the expansion page...
|
||||
currentPage = ++currentPage % 3; // ...increment the current page (3 pages)
|
||||
}
|
||||
expansionPage = 0; // set expansionPage to false
|
||||
display.clearDisplay();
|
||||
// Label the soft keys
|
||||
// may update this when I implement multiple pages of soft-keys...
|
||||
if (currentPage == 0)
|
||||
|
@ -551,6 +564,7 @@ void changePage()
|
|||
softkeyStatus[4] = page2SoftkeyStatus5();
|
||||
softkeyStatus[5] = page2SoftkeyStatus6();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void displaySoftKeyStatus()
|
||||
|
|
Ładowanie…
Reference in New Issue