From c886cdd747d49d9accbde4d7c2dada1cbf8c6d22 Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Mon, 16 Sep 2019 15:39:57 -0500 Subject: Reduced spectral scan thread's polling --- lora_pkt_fwd/src/lora_pkt_fwd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c index f26a51a..40b3098 100644 --- a/lora_pkt_fwd/src/lora_pkt_fwd.c +++ b/lora_pkt_fwd/src/lora_pkt_fwd.c @@ -3198,12 +3198,11 @@ void thread_spectralscan(void) { pthread_mutex_unlock(&mx_scan_config); while (!exit_sig && !quit_sig) { + wait_ms(1000); gettimeofday(&tv, NULL); // Form the seconds of the day long hms = tv.tv_sec % 86400; - // int hour = hms / 3600; int min = (hms % 3600) / 60; - // int sec = (hms % 3600) % 60; // or hms % SEC_PER_MIN pthread_mutex_lock(&mx_scan_config); if (scan_config_new.read == false) { scan_config = scan_config_new; -- cgit v1.2.3