From 8752822a3ea2b244cf766f78fe56293d01fd96eb Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 23 Jun 2021 09:17:36 -0400 Subject: [PATCH] if uptime = 0, reset count = 0 so fill frames are ignored at start --- afsk/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index d26effcf..4f140127 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -1756,7 +1756,8 @@ void get_tlm_fox() { // printf("h[0] %x\n", h[0]); h[1] = (short int) ((reset_count >> 5) & 0xff); // printf("h[1] %x\n", h[1]); - h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); + if (uptime != 0) // if uptime is 0, leave reset count at 0 + h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); // printf("h[2] %x\n", h[2]); h[2] = (short int) ((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); // printf("h[2] %x\n", h[2]);