diff options
author | Harsh Sharma <92harshsharma@gmail.com> | 2018-06-13 13:46:34 -0500 |
---|---|---|
committer | Harsh Sharma <92harshsharma@gmail.com> | 2018-06-13 13:46:34 -0500 |
commit | 06d7f22b12d9f11586312c25add92de58a1cebf8 (patch) | |
tree | fd42c6cba50f52c6f54ea7a76311fccf12aa487e | |
parent | a1e618b2e27112153aa37670ce921d1ab3c940a8 (diff) | |
download | packet_forwarder_mtac_full-06d7f22b12d9f11586312c25add92de58a1cebf8.tar.gz packet_forwarder_mtac_full-06d7f22b12d9f11586312c25add92de58a1cebf8.tar.bz2 packet_forwarder_mtac_full-06d7f22b12d9f11586312c25add92de58a1cebf8.zip |
Applied patch: lora-packet-forwarder-parse-config-params-when-radio-disabled
-rw-r--r-- | lora_pkt_fwd/src/lora_pkt_fwd.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c index 0cbfbe5..e69bc88 100644 --- a/lora_pkt_fwd/src/lora_pkt_fwd.c +++ b/lora_pkt_fwd/src/lora_pkt_fwd.c @@ -492,7 +492,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); @@ -526,8 +527,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); |