Merge pull request #21 from phdlee/version1.02

Version1.02
This commit is contained in:
phdlee 2018-02-14 12:11:38 +09:00 committed by GitHub
commit c911d26163
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 28 deletions

View File

@ -749,9 +749,11 @@ void doRIT(){
unsigned long old_freq = frequency; unsigned long old_freq = frequency;
if (knob < 0) if (knob < 0)
frequency -= 100l; frequency -= (arTuneStep[tuneStepIndex -1]); //
//frequency -= 100l;
else if (knob > 0) else if (knob > 0)
frequency += 100; frequency += (arTuneStep[tuneStepIndex -1]); //
//frequency += 100;
if (old_freq != frequency){ if (old_freq != frequency){
setFrequency(frequency); setFrequency(frequency);
@ -1116,11 +1118,6 @@ void setup()
factory_alignment(); factory_alignment();
} }
//for debug
int dbgCnt = 0;
byte flasher = 0;
//Auto save Frequency and Mode with Protected eeprom life by KD8CEC //Auto save Frequency and Mode with Protected eeprom life by KD8CEC
void checkAutoSaveFreqMode() void checkAutoSaveFreqMode()
{ {
@ -1139,21 +1136,8 @@ void checkAutoSaveFreqMode()
//check time for Frequency auto save //check time for Frequency auto save
if (millis() - saveCheckTime > saveIntervalSec * 1000) 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); FrequencyToVFO(1);
saveCheckTime = 0; //for reduce cpu use rate
} }
} }
} }
@ -1180,11 +1164,11 @@ void loop(){
if (isCWAutoMode == 0 && beforeIdle_ProcessTime < millis() - 250) { if (isCWAutoMode == 0 && beforeIdle_ProcessTime < millis() - 250) {
idle_process(); idle_process();
checkAutoSaveFreqMode(); //move here form out scope for reduce cpu use rate
beforeIdle_ProcessTime = millis(); beforeIdle_ProcessTime = millis();
} }
} //end of check TX Status } //end of check TX Status
//we check CAT after the encoder as it might put the radio into TX //we check CAT after the encoder as it might put the radio into TX
Check_Cat(inTx? 1 : 0); Check_Cat(inTx? 1 : 0);
checkAutoSaveFreqMode();
} }

View File

@ -172,6 +172,9 @@ void cwKeyer(void){
keyerControl &= ~(DIT_L + DAH_L); // clear both paddle latch bits keyerControl &= ~(DIT_L + DAH_L); // clear both paddle latch bits
keyerState = KEYED; // next state keyerState = KEYED; // next state
if (!inTx){ if (!inTx){
//DelayTime Option
delay_background(delayBeforeCWStartTime * 2, 2);
keyDown = 0; keyDown = 0;
cwTimeout = millis() + cwDelayTime * 10; //+ CW_TIMEOUT; cwTimeout = millis() + cwDelayTime * 10; //+ CW_TIMEOUT;
startTx(TX_CW, 1); startTx(TX_CW, 1);
@ -212,6 +215,9 @@ void cwKeyer(void){
if (update_PaddleLatch(0) == DIT_L) { if (update_PaddleLatch(0) == DIT_L) {
// if we are here, it is only because the key is pressed // if we are here, it is only because the key is pressed
if (!inTx){ if (!inTx){
//DelayTime Option
delay_background(delayBeforeCWStartTime * 2, 2);
keyDown = 0; keyDown = 0;
cwTimeout = millis() + cwDelayTime * 10; //+ CW_TIMEOUT; cwTimeout = millis() + cwDelayTime * 10; //+ CW_TIMEOUT;
startTx(TX_CW, 1); startTx(TX_CW, 1);
@ -229,13 +235,14 @@ void cwKeyer(void){
keyDown = 0; keyDown = 0;
stopTx(); stopTx();
} }
if (!cwTimeout) //if (!cwTimeout) //removed by KD8CEC
return; // return;
// got back to the beginning of the loop, if no further activity happens on straight key // got back to the beginning of the loop, if no further activity happens on straight key
// we will time out, and return out of this routine // we will time out, and return out of this routine
//delay(5); //delay(5);
delay_background(5, 3); //delay_background(5, 3); //removed by KD8CEC
continue; //continue; //removed by KD8CEC
return; //Tx stop control by Main Loop
} }
Check_Cat(2); Check_Cat(2);

View File

@ -1345,7 +1345,7 @@ void doMenu(){
//ADJUST TUNE STEP //ADJUST TUNE STEP
if (btnDownTimeCount > PRESS_ADJUST_TUNE) if (btnDownTimeCount > PRESS_ADJUST_TUNE)
{ {
printLineF1(F("Press to set step")); printLineF1(F("Press to set"));
isNeedDisplay = 1; //check to need display for display current value isNeedDisplay = 1; //check to need display for display current value
while (!btnDown()) while (!btnDown())
@ -1382,7 +1382,7 @@ void doMenu(){
} }
} //end of while } //end of while
printLineF2(F("Changed Step!")); //printLineF2(F("Changed Step!")); //remarked for reduce program memory by KD8CEC
//SAVE EEPROM //SAVE EEPROM
EEPROM.put(TUNING_STEP, tuneStepIndex); EEPROM.put(TUNING_STEP, tuneStepIndex);
delay_background(500, 0); delay_background(500, 0);