From 279943ce75b7b971c8fe1c363d860bfd03f2dc76 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Mon, 25 Jul 2022 06:56:27 -0400 Subject: [PATCH] sleep in sec not ms --- cubesatsim/cubesatsim.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index ab611a3d..b93f4f6f 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -144,7 +144,7 @@ void loop() { else if (mode == AFSK) { transmit_callsign(callsign); - sleep(1000); + sleep(1.0); send_packet(); } // while ((millis() - sampleTime) < ((unsigned int)samplePeriod)) // - 250)) // was 250 100 @@ -3351,7 +3351,7 @@ void transmit_string(char *string) { if (string[i] != ' ') transmit_char(string[i++]); else - sleep(3 * morse_timing); + sleep((3 * morse_timing)/1000); } } @@ -3359,7 +3359,7 @@ void transmit_char(char character) { int i = 0; while ((morse_table[(toupper(character) - '0') % 44][i] != 0) && (i < 5)) { transmit_mili(morse_freq, morse_table[(toupper(character) - '0') % 44][i++] * morse_timing); - sleep(morse_timing); + sleep(morse_timing/1000); } }