From e58b8dd14a80acd9acbe0636902e94919c4bbc82 Mon Sep 17 00:00:00 2001 From: Jason Reiss Date: Thu, 15 Apr 2021 11:24:36 -0500 Subject: increment size with each temp table --- lora_pkt_fwd/src/lora_pkt_fwd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c index 25c0d78..4853c58 100644 --- a/lora_pkt_fwd/src/lora_pkt_fwd.c +++ b/lora_pkt_fwd/src/lora_pkt_fwd.c @@ -436,7 +436,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); @@ -476,6 +476,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 */ -- cgit v1.2.3