summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2021-04-15 10:14:12 -0500
committerJason Reiss <jreiss@multitech.com>2021-04-15 10:14:12 -0500
commit91b82d23fb1506d9176c06049aac4c04312c1cc9 (patch)
tree31c5f2819acaaedd999276a97839630a97f9e387
parenteb187e68854ee7d1896890240e85d73811124146 (diff)
downloadpacket_forwarder_mtac_full-91b82d23fb1506d9176c06049aac4c04312c1cc9.tar.gz
packet_forwarder_mtac_full-91b82d23fb1506d9176c06049aac4c04312c1cc9.tar.bz2
packet_forwarder_mtac_full-91b82d23fb1506d9176c06049aac4c04312c1cc9.zip
increment size with each temp table4.0.4-5
-rw-r--r--lora_pkt_fwd/src/lora_pkt_fwd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
index c6a01b2..bfcca1f 100644
--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
+++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
@@ -440,7 +440,7 @@ void load_temp_lookup() {
MSG("INFO: no configuration for tx gain lut %i\n", i);
continue;
}
- tx_temp_lut.size++; /* update TX LUT size based on JSON object found in configuration file */
+
/* there is an object to configure that TX gain index, let's parse it */
snprintf(param_name, sizeof param_name, "tx_lut_%i.pa_gain", i);
val = json_object_dotget_value(conf_obj, param_name);
@@ -480,6 +480,7 @@ void load_temp_lookup() {
snprintf(param_name, sizeof param_name, "LUT%i", temp); /* compose parameter path inside JSON structure */
conf_array = json_object_get_array(json_value_get_object(root_val), param_name);
if (conf_array != NULL) {
+ tx_temp_lut.size++;
tx_temp_lut.lut[index].temp = temp;
for (int j = 0; j < 64; j++) {
/* Get lut channel configuration object from array */
@@ -488,6 +489,8 @@ void load_temp_lookup() {
index++;
}
}
+
+ MSG("Loaded %d temperature tables\n", tx_temp_lut.size);
}