modified CW Key Logic for AutoKey and reduce cpu use rate, reduce program memory

This commit is contained in:
phdlee
2018-02-10 15:07:56 +09:00
parent ed767f2e34
commit 81333e7af4
3 changed files with 9 additions and 26 deletions

View File

@@ -1116,11 +1116,6 @@ void setup()
factory_alignment();
}
//for debug
int dbgCnt = 0;
byte flasher = 0;
//Auto save Frequency and Mode with Protected eeprom life by KD8CEC
void checkAutoSaveFreqMode()
{
@@ -1139,21 +1134,8 @@ void checkAutoSaveFreqMode()
//check time for Frequency auto save
if (millis() - saveCheckTime > saveIntervalSec * 1000)
{
/*
if (vfoActive == VFO_A)
{
vfoA = frequency;
vfoA_mode = modeToByte();
storeFrequencyAndMode(1);
}
else
{
vfoB = frequency;
vfoB_mode = modeToByte();
storeFrequencyAndMode(2);
}
*/
FrequencyToVFO(1);
saveCheckTime = 0; //for reduce cpu use rate
}
}
}
@@ -1180,11 +1162,11 @@ void loop(){
if (isCWAutoMode == 0 && beforeIdle_ProcessTime < millis() - 250) {
idle_process();
checkAutoSaveFreqMode(); //move here form out scope for reduce cpu use rate
beforeIdle_ProcessTime = millis();
}
} //end of check TX Status
//we check CAT after the encoder as it might put the radio into TX
Check_Cat(inTx? 1 : 0);
checkAutoSaveFreqMode();
}