From 368883dcd97dc456f2523c7e404b0252aca7fed9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:41:32 -0500 Subject: [PATCH] Update main.c move sampleTime set --- main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index a38404fe..e0395330 100644 --- a/main.c +++ b/main.c @@ -1883,8 +1883,7 @@ void get_tlm_fox() { printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); } } - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); + // if (firstTime == 1) // max -= 1; } @@ -1908,12 +1907,16 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } -// if (firstTime && (mode == PACSAT)) -// { -// firstTime = OFF; -// fprintf(stderr, "No longer first time\n"); -// fflush(stdout); -// } + if (firstTime && (mode == PACSAT)) + { + firstTime = OFF; + fprintf(stderr, "No longer first time\n"); + fflush(stdout); + } + + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); + return; }