From 5013b81bc07ea1de8f006a52f7988b37741a3594 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sun, 27 Dec 2020 11:26:57 -0500 Subject: [PATCH] reduced to 2.5 --- afsk/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index 1665c890..30543d92 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -134,7 +134,8 @@ char call[5]; int bitRate, mode, bufLen, rsFrames, payloads, rsFrameLen, dataLen, headerLen, syncBits, syncWord, parityLen, samples, frameCnt, samplePeriod; float sleepTime; -int sampleTime = 0, frames_sent = 0; +unsigned int sampleTime = 0 +int frames_sent = 0; int cw_id = ON; int vB4 = FALSE, vB5 = FALSE, vB3 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; float batteryThreshold = 3.0, batteryVoltage; @@ -1057,7 +1058,7 @@ void get_tlm_fox() { while ((millis() - sampleTime) < (unsigned int)samplePeriod) sleep((unsigned int)sleepTime); */ - sleep(3.0); + sleep(2.5); digitalWrite(txLed, txLedOff); #ifdef DEBUG_LOGGING @@ -1065,7 +1066,7 @@ void get_tlm_fox() { #endif printf("Sample period: %d\n", millis() - (unsigned int)sampleTime); - sampleTime = (int) millis(); + sampleTime = (unsigned int) millis(); } else printf("first time - no sleep\n");