From 0441b8fdbd14f8c83e6234456fa16b22e0ebc604 Mon Sep 17 00:00:00 2001 From: lwvmobile Date: Mon, 28 Nov 2022 09:23:56 -0500 Subject: [PATCH] Hangtime Safety Parenthesis --- src/dsd_frame_sync.c | 2 +- src/dsd_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dsd_frame_sync.c b/src/dsd_frame_sync.c index 9212359..e6c04f1 100644 --- a/src/dsd_frame_sync.c +++ b/src/dsd_frame_sync.c @@ -150,7 +150,7 @@ getFrameSync (dsd_opts * opts, dsd_state * state) //start control channel hunting if using trunking, time needs updating on each successful sync //will need to assign frequencies to a CC array for P25 since that isn't imported from CSV - if (opts->p25_is_tuned == 0 && opts->p25_trunk == 1 && (time(NULL) - state->last_cc_sync_time > (opts->trunk_hangtime + 2)) ) + if (opts->p25_is_tuned == 0 && opts->p25_trunk == 1 && ( (time(NULL) - state->last_cc_sync_time) > (opts->trunk_hangtime + 2) ) ) { //test to switch back to 10/4 P1 QPSK for P25 FDMA CC diff --git a/src/dsd_main.c b/src/dsd_main.c index 8aa114f..cd4ed57 100644 --- a/src/dsd_main.c +++ b/src/dsd_main.c @@ -78,7 +78,7 @@ noCarrier (dsd_opts * opts, dsd_state * state) { //tune back to last known CC when using trunking after x second hangtime - if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1 && time(NULL) - state->last_cc_sync_time > opts->trunk_hangtime) + if (opts->p25_trunk == 1 && opts->p25_is_tuned == 1 && ( (time(NULL) - state->last_cc_sync_time) > opts->trunk_hangtime) ) { if (state->p25_cc_freq != 0) {