summaryrefslogtreecommitdiff
path: root/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-parse-config-params-when-radio-disabled.patch
blob: 0e7ded979a26bf3f55fa31ddb608f3c747a0617c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
index 1c54d57..92f25e3 100644
--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
+++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
@@ -471,7 +471,8 @@ static int parse_SX1301_configuration(const char * conf_file) {
         }
         if (rfconf.enable == false) { /* radio disabled, nothing else to parse */
             MSG("INFO: radio %i disabled\n", i);
-        } else  { /* radio enabled, will parse the other parameters */
+        }
+//        } else  { /* radio enabled, will parse the other parameters */
             snprintf(param_name, sizeof param_name, "radio_%i.freq", i);
             rfconf.freq_hz = (uint32_t)json_object_dotget_number(conf_obj, param_name);
             snprintf(param_name, sizeof param_name, "radio_%i.rssi_offset", i);
@@ -505,8 +506,8 @@ static int parse_SX1301_configuration(const char * conf_file) {
             } else {
                 rfconf.tx_enable = false;
             }
-            MSG("INFO: radio %i enabled (type %s), center frequency %u, RSSI offset %f, tx enabled %d, tx_notch_freq %u\n", i, str, rfconf.freq_hz, rfconf.rssi_offset, rfconf.tx_enable, rfconf.tx_notch_freq);
-        }
+            MSG("INFO: radio %i %sabled (type %s), center frequency %u, RSSI offset %f, tx enabled %d, tx_notch_freq %u\n", i, (rfconf.enable?"en":"dis"), str, rfconf.freq_hz, rfconf.rssi_offset, rfconf.tx_enable, rfconf.tx_notch_freq);
+//        }
         /* all parameters parsed, submitting configuration to the HAL */
         if (lgw_rxrf_setconf(i, rfconf) != LGW_HAL_SUCCESS) {
             MSG("ERROR: invalid configuration for radio %i\n", i);