Added back in the tone waits in morseOut.

This commit is contained in:
Stephen Olesen 2015-06-30 16:03:21 -06:00
parent fc09429133
commit 0fd2d484e1
1 changed files with 5 additions and 2 deletions

View File

@ -1285,10 +1285,13 @@ void HamShield::morseOut(char buffer[HAMSHIELD_MORSE_BUFFER_SIZE]) {
uint8_t bits = morseLookup(buffer[i]);
if(bits) { // If it is a valid character...
do {
if(bits & 1)
if(bits & 1) {
tone(HAMSHIELD_PWM_PIN, 1000, HAMSHIELD_MORSE_DOT * 3);
else
delay(HAMSHIELD_MORSE_DOT*3);
} else {
tone(HAMSHIELD_PWM_PIN, 1000, HAMSHIELD_MORSE_DOT);
delay(HAMSHIELD_MORSE_DOT);
}
delay(HAMSHIELD_MORSE_DOT);
bits >>= 1; // Shift into the next symbol
} while(bits != 1); // Wait for 1 termination to be all we have left