Instead of having long press of tuner enter menu, have it turn on morse menu readout mode instead

This commit is contained in:
Reed Nightingale 2020-01-21 23:19:00 -08:00
parent d854a51184
commit a9e73bb102

View File

@ -30,10 +30,11 @@
* Si5351 object to control the clocks. * Si5351 object to control the clocks.
*/ */
#include <Wire.h> #include <Wire.h>
#include "morse.h"
#include "nano_gui.h"
#include "settings.h" #include "settings.h"
#include "setup.h" #include "setup.h"
#include "ubitx.h" #include "ubitx.h"
#include "nano_gui.h"
/** /**
* The Arduino, unlike C/C++ on a regular computer with gigabytes of RAM, has very little memory. * The Arduino, unlike C/C++ on a regular computer with gigabytes of RAM, has very little memory.
@ -65,8 +66,6 @@ unsigned char doingCAT = 0;
void active_delay(int delay_by){ void active_delay(int delay_by){
unsigned long timeStart = millis(); unsigned long timeStart = millis();
while (millis() - timeStart <= (unsigned long)delay_by) { while (millis() - timeStart <= (unsigned long)delay_by) {
delay(10);
//Background Work
checkCAT(); checkCAT();
} }
} }
@ -322,13 +321,20 @@ void checkButton(){
active_delay(10); active_delay(10);
downTime++; downTime++;
if (downTime > 300){ if (downTime > 300){
doSetup2(); if(!globalSettings.morseMenuOn){
globalSettings.morseMenuOn = true;//set before playing
morseLetter(2);
}
else{
morseLetter(4);
globalSettings.morseMenuOn = false;//unset after playing
}
SaveSettingsToEeprom();
return; return;
} }
} }
active_delay(100); active_delay(100);
doCommands(); doCommands();
//wait for the button to go up again //wait for the button to go up again
while(btnDown()) while(btnDown())