diff --git a/afsk/main.c b/afsk/main.c index 97460b48..6059e29e 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -1016,23 +1016,25 @@ void get_tlm(void) { strcat(str, footer_str); fprintf(stderr, "String to execute: %s\n", str); - digitalWrite(txLed, txLedOn); - #ifdef DEBUG_LOGGING - printf("Tx LED On 6\n"); - #endif + if (transmit) { + digitalWrite(txLed, txLedOn); + #ifdef DEBUG_LOGGING + printf("Tx LED On 6\n"); + #endif FILE * file2 = popen(str, "r"); pclose(file2); + digitalWrite(txLed, txLedOff); + #ifdef DEBUG_LOGGING + printf("Tx LED Off 6\n"); + #endif sleep(2); } else { fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } - digitalWrite(txLed, txLedOff); - #ifdef DEBUG_LOGGING - printf("Tx LED Off 6\n"); - #endif + sleep(3); }