From e67885d8a0e5414d352da2889a64f850ab8f570e Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Sun, 26 Jan 2020 13:03:50 -0800 Subject: [PATCH 1/2] disable delay before starting CW, allow straight key values through the paddle resistors, set correct timeout --- keyer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyer.cpp b/keyer.cpp index 21bdf98..d213978 100644 --- a/keyer.cpp +++ b/keyer.cpp @@ -38,7 +38,7 @@ static const unsigned int cwAdcDotTo = 600; static const unsigned int cwAdcDashFrom = cwAdcDotTo + 1; static const unsigned int cwAdcDashTo = 800; -static const unsigned int delayBeforeCWStartTime = 50; +static const unsigned int delayBeforeCWStartTime = 0; /** * Starts transmitting the carrier with the sidetone @@ -93,7 +93,7 @@ char update_PaddleLatch(bool isUpdateKeyState) { else{ if (KeyerMode_e::KEYER_STRAIGHT != globalSettings.keyerMode) tmpKeyerControl = 0 ; - else if (paddle <= cwAdcSTTo) + else if (paddle <= cwAdcDashTo) tmpKeyerControl = DIT_L ; else tmpKeyerControl = 0 ; @@ -209,7 +209,7 @@ void cwKeyer(void){ //DelayTime Option active_delay(delayBeforeCWStartTime * 2); - globalSettings.cwExpirationTimeMs = millis() + globalSettings.cwDitDurationMs; + globalSettings.cwExpirationTimeMs = millis() + globalSettings.cwActiveTimeoutMs; } cwKeydown(); From 8db6401becccc80d4cdb4eaf577dff7e8e90f0d4 Mon Sep 17 00:00:00 2001 From: Reed Nightingale Date: Mon, 27 Jan 2020 21:51:34 -0800 Subject: [PATCH 2/2] Remove delay entirely. active_delay delays 10ms even when asked for 0 --- keyer.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/keyer.cpp b/keyer.cpp index d213978..d138013 100644 --- a/keyer.cpp +++ b/keyer.cpp @@ -38,8 +38,6 @@ static const unsigned int cwAdcDotTo = 600; static const unsigned int cwAdcDashFrom = cwAdcDotTo + 1; static const unsigned int cwAdcDashTo = 800; -static const unsigned int delayBeforeCWStartTime = 0; - /** * Starts transmitting the carrier with the sidetone * It assumes that we have called cwTxStart and not called cwTxStop @@ -156,8 +154,6 @@ void cwKeyer(void){ case KEYED_PREP: //modified KD8CEC if (!globalSettings.txActive){ - //DelayTime Option - active_delay(delayBeforeCWStartTime * 2); globalSettings.cwExpirationTimeMs = millis() + globalSettings.cwActiveTimeoutMs; startTx(TuningMode_e::TUNE_CW); } @@ -205,10 +201,6 @@ void cwKeyer(void){ // if we are here, it is only because the key is pressed if (!globalSettings.txActive){ startTx(TuningMode_e::TUNE_CW); - - //DelayTime Option - active_delay(delayBeforeCWStartTime * 2); - globalSettings.cwExpirationTimeMs = millis() + globalSettings.cwActiveTimeoutMs; } cwKeydown();