diff --git a/afsk/main.c b/afsk/main.c index 3389f529..17663030 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -1722,15 +1722,19 @@ void get_tlm_fox() { sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); printf("Millis7: %d Result of socket send: %d \n\n", millis() - start, sock_ret); } - start = millis(); // send frame a second time - sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); - printf("Millis8: %d Result of socket send: %d \n\n", (unsigned int)millis() - start, sock_ret); - if (sock_ret < (ctr * 2 + 2)) { + if (mode == BPSK) + { + start = millis(); // send frame a second time + sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); + printf("Millis8: %d Result of socket send: %d \n\n", (unsigned int)millis() - start, sock_ret); + + if (sock_ret < (ctr * 2 + 2)) { // printf("Not resending\n"); - sleep(0.5); - sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); - printf("Millis9: %d Result of socket send: %d \n\n", millis() - start, sock_ret); + sleep(0.5); + sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); + printf("Millis9: %d Result of socket send: %d \n\n", millis() - start, sock_ret); + } } if (sock_ret == -1) {