From 10cefee9392fd02ca958447074c0c08b50288725 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 12 Oct 2024 20:47:49 -0400 Subject: [PATCH] Update main.c only increment reset_count if rebooted --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index d00ea616..078316fa 100644 --- a/main.c +++ b/main.c @@ -50,8 +50,8 @@ int main(int argc, char * argv[]) { fprintf(stderr, "Transmit on %s MHz Receive on %s MHz\n", tx, rx); // program_radio(); // do in rpitx instead - - reset_count = (reset_count + 1) % 0xffff; + if (uptime_sec < 30.0) + reset_count = (reset_count + 1) % 0xffff; // only increment uptime if just rebooted if ((fabs(lat_file) > 0) && (fabs(lat_file) < 90.0) && (fabs(long_file) > 0) && (fabs(long_file) < 180.0)) { fprintf(stderr, "Valid latitude and longitude in config file\n");