change confirmation key PTT->function key for easy interface

This commit is contained in:
phdlee 2018-01-30 20:02:49 +09:00
parent 4830db78cb
commit 85832de034

View File

@ -452,8 +452,6 @@ void menuSelectMode(int btn){
} }
} }
void menuSplitOnOff(int btn){ void menuSplitOnOff(int btn){
if (!btn){ if (!btn){
if (splitOn == 0) if (splitOn == 0)
@ -478,8 +476,6 @@ void menuSplitOnOff(int btn){
} }
} }
/* /*
//Select CW Key Type by KD8CEC //Select CW Key Type by KD8CEC
void menuSetupKeyType(int btn){ void menuSetupKeyType(int btn){
@ -522,14 +518,14 @@ void menuSetupKeyType(int btn){
int knob = 0; int knob = 0;
int selectedKeyType = 0; int selectedKeyType = 0;
int moveStep = 0; int moveStep = 0;
if (!btn && digitalRead(PTT) == HIGH){ if (!btn){
printLineF2(F("Change Key Type?")); printLineF2(F("Change Key Type?"));
} }
else { else {
printLineF2(F("Press PTT to set")); printLineF2(F("Press to set Key"));
delay_background(500, 0); delay_background(500, 0);
selectedKeyType = cwKeyType; selectedKeyType = cwKeyType;
while(!btnDown() && digitalRead(PTT) == HIGH){ while(!btnDown()){
//Display Key Type //Display Key Type
if (selectedKeyType == 0) if (selectedKeyType == 0)
@ -559,8 +555,6 @@ void menuSetupKeyType(int btn){
Check_Cat(0); //To prevent disconnections Check_Cat(0); //To prevent disconnections
} }
//save the setting
if (digitalRead(PTT) == LOW){
printLineF2(F("CW Key Type set!")); printLineF2(F("CW Key Type set!"));
cwKeyType = selectedKeyType; cwKeyType = selectedKeyType;
EEPROM.put(CW_KEY_TYPE, cwKeyType); EEPROM.put(CW_KEY_TYPE, cwKeyType);
@ -576,7 +570,6 @@ void menuSetupKeyType(int btn){
keyerControl |= IAMBICB; keyerControl |= IAMBICB;
} }
delay_background(2000, 0); delay_background(2000, 0);
}
printLine2ClearAndUpdate(); printLine2ClearAndUpdate();
menuOn = 0; menuOn = 0;
@ -738,7 +731,7 @@ void menuCWSpeed(int btn){
return; return;
} }
printLineF1(F("Press PTT to set")); printLineF1(F("Press to set WPm"));
strcpy(b, "WPM:"); strcpy(b, "WPM:");
itoa(wpm,c, 10); itoa(wpm,c, 10);
strcat(b, c); strcat(b, c);
@ -768,12 +761,12 @@ void menuCWSpeed(int btn){
} }
//save the setting //save the setting
if (digitalRead(PTT) == LOW){ //if (digitalRead(PTT) == LOW){
printLineF2(F("CW Speed set!")); printLineF2(F("CW Speed set!"));
cwSpeed = 1200/wpm; cwSpeed = 1200/wpm;
EEPROM.put(CW_SPEED, cwSpeed); EEPROM.put(CW_SPEED, cwSpeed);
delay_background(2000, 0); delay_background(2000, 0);
} //}
printLine2ClearAndUpdate(); printLine2ClearAndUpdate();
menuOn = 0; menuOn = 0;
} }
@ -813,7 +806,7 @@ void menuSetupCwDelay(int btn){
return; return;
} }
printLineF1(F("Press PTT to set")); printLineF1(F("Press, set Delay"));
strcpy(b, "DELAY:"); strcpy(b, "DELAY:");
itoa(tmpCWDelay,c, 10); itoa(tmpCWDelay,c, 10);
strcat(b, c); strcat(b, c);
@ -841,12 +834,12 @@ void menuSetupCwDelay(int btn){
} }
//save the setting //save the setting
if (digitalRead(PTT) == LOW){ //if (digitalRead(PTT) == LOW){
printLineF2(F("CW Delay set!")); printLineF2(F("CW Delay set!"));
cwDelayTime = tmpCWDelay / 10; cwDelayTime = tmpCWDelay / 10;
EEPROM.put(CW_DELAY, cwDelayTime); EEPROM.put(CW_DELAY, cwDelayTime);
delay_background(2000, 0); delay_background(2000, 0);
} //}
printLine2ClearAndUpdate(); printLine2ClearAndUpdate();
menuOn = 0; menuOn = 0;
} }
@ -862,7 +855,7 @@ void menuSetupTXCWInterval(int btn){
return; return;
} }
printLineF1(F("Press PTT to set")); printLineF1(F("Press, set Delay"));
strcpy(b, "Start Delay:"); strcpy(b, "Start Delay:");
itoa(tmpTXCWInterval,c, 10); itoa(tmpTXCWInterval,c, 10);
strcat(b, c); strcat(b, c);
@ -890,12 +883,12 @@ void menuSetupTXCWInterval(int btn){
} }
//save the setting //save the setting
if (digitalRead(PTT) == LOW){ //if (digitalRead(PTT) == LOW){
printLineF2(F("CW Start set!")); printLineF2(F("CW Start set!"));
delayBeforeCWStartTime = tmpTXCWInterval / 2; delayBeforeCWStartTime = tmpTXCWInterval / 2;
EEPROM.put(CW_START, delayBeforeCWStartTime); EEPROM.put(CW_START, delayBeforeCWStartTime);
delay_background(2000, 0); delay_background(2000, 0);
} //}
printLine2ClearAndUpdate(); printLine2ClearAndUpdate();
menuOn = 0; menuOn = 0;
} }