From 8c6b0d841d7c221d60d430cd5aff75ff801e63ee Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 15 Jul 2020 09:50:36 -0400 Subject: [PATCH] added changes to remove delays on first four frames for BPSK --- afsk/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index 20a928ad..1f51f9de 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -122,7 +122,7 @@ char call[5]; int bitRate, mode, bufLen, rsFrames, payloads, rsFrameLen, dataLen, headerLen, syncBits, syncWord, parityLen, samples, frameCnt, samplePeriod; float sleepTime; -int sampleTime = 0; +int sampleTime = 0, frames_sent = 0; int cw_id = ON; int vB4 = FALSE, vB5 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; float batteryThreshold = 0; @@ -534,7 +534,7 @@ printf("After command\n"); while (loop-- != 0) { - + frames_sent++; float batteryVoltage = read_sensor_data(sensor[BAT]).voltage; #ifdef DEBUG_LOGGING fprintf(stderr,"INFO: Battery voltage: %f V Battery Threshold %f V\n", batteryVoltage, batteryThreshold); @@ -1379,7 +1379,11 @@ if (firstTime != ON) fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } // digitalWrite (0, HIGH); - firstTime = 0; + + if (mode == FSK) + firstTime = 0; + else if (frames_sent > 5) + firstTime = 0; return 0; }