summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}