summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2019-09-16 15:39:57 -0500
committerHarsh Sharma <harsh.sharma@multitech.com>2019-09-16 15:39:57 -0500
commitc886cdd747d49d9accbde4d7c2dada1cbf8c6d22 (patch)
treedb0725aa1eb80ddeb9c7c52e4bb32f65f241a3b0
parenta32deb8ba7ce6987a7964958c079f3dc078fa0c8 (diff)
downloadpacket_forwarder_mtac_full-c886cdd747d49d9accbde4d7c2dada1cbf8c6d22.tar.gz
packet_forwarder_mtac_full-c886cdd747d49d9accbde4d7c2dada1cbf8c6d22.tar.bz2
packet_forwarder_mtac_full-c886cdd747d49d9accbde4d7c2dada1cbf8c6d22.zip
Reduced spectral scan thread's polling
-rw-r--r--lora_pkt_fwd/src/lora_pkt_fwd.c3
1 files changed, 1 insertions, 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;