sleep in sec not ms

pico-v0.1
alanbjohnston 3 years ago committed by GitHub
parent 1dddc9a2e7
commit 279943ce75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -144,7 +144,7 @@ void loop() {
else if (mode == AFSK) else if (mode == AFSK)
{ {
transmit_callsign(callsign); transmit_callsign(callsign);
sleep(1000); sleep(1.0);
send_packet(); send_packet();
} }
// while ((millis() - sampleTime) < ((unsigned int)samplePeriod)) // - 250)) // was 250 100 // while ((millis() - sampleTime) < ((unsigned int)samplePeriod)) // - 250)) // was 250 100
@ -3351,7 +3351,7 @@ void transmit_string(char *string) {
if (string[i] != ' ') if (string[i] != ' ')
transmit_char(string[i++]); transmit_char(string[i++]);
else else
sleep(3 * morse_timing); sleep((3 * morse_timing)/1000);
} }
} }
@ -3359,7 +3359,7 @@ void transmit_char(char character) {
int i = 0; int i = 0;
while ((morse_table[(toupper(character) - '0') % 44][i] != 0) && (i < 5)) { while ((morse_table[(toupper(character) - '0') % 44][i] != 0) && (i < 5)) {
transmit_mili(morse_freq, morse_table[(toupper(character) - '0') % 44][i++] * morse_timing); transmit_mili(morse_freq, morse_table[(toupper(character) - '0') % 44][i++] * morse_timing);
sleep(morse_timing); sleep(morse_timing/1000);
} }
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.