diff --git a/keyer.cpp b/keyer.cpp index 121477f..c802c2f 100644 --- a/keyer.cpp +++ b/keyer.cpp @@ -205,8 +205,7 @@ void cwKeyer(void){ } cwKeydown(); - while ( update_PaddleLatch(0) == DIT_L ) - active_delay(1); + while ( update_PaddleLatch(0) == DIT_L ); cwKeyUp(); } diff --git a/morse.cpp b/morse.cpp index 0a9596d..dde51c9 100644 --- a/morse.cpp +++ b/morse.cpp @@ -66,7 +66,7 @@ void morseLetter(char c, uint16_t dit_duration_ms){ //handle space character as three dashes if (c == ' '){ - active_delay(7 * dit_duration_ms); + delay(7 * dit_duration_ms); //Serial.print(' '); return; } diff --git a/ubitx.h b/ubitx.h index 94e911b..37b2c51 100644 --- a/ubitx.h +++ b/ubitx.h @@ -95,7 +95,6 @@ extern char c[30], b[128]; static const uint32_t THRESHOLD_USB_LSB = 10000000L; /* these are functions implemented in the main file named as ubitx_xxx.ino */ -void active_delay(int delay_by); void saveVFOs(); void setFrequency(const unsigned long freq, const bool transmit = false); void startTx(TuningMode_e tx_mode); diff --git a/ubitxv6.ino b/ubitxv6.ino index 6c6c5b7..30330d9 100644 --- a/ubitxv6.ino +++ b/ubitxv6.ino @@ -64,17 +64,6 @@ unsigned char doingCAT = 0; * you start hacking around */ -/** - * Our own delay. During any delay, the raduino should still be processing a few times. - */ - -void active_delay(int delay_by){ - unsigned long timeStart = millis(); - while (millis() - timeStart <= (unsigned long)delay_by) { - checkCAT(); - } -} - void saveVFOs() { SaveSettingsToEeprom(); @@ -299,7 +288,7 @@ void checkPTT(){ if(digitalRead(PTT) == 0 && !globalSettings.txActive){ startTx(TuningMode_e::TUNE_SSB); - active_delay(50); //debounce the PTT + delay(50); //debounce the PTT } if (digitalRead(PTT) == 1 && globalSettings.txActive)