summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2019-10-29 16:47:46 -0500
committerHarsh Sharma <harsh.sharma@multitech.com>2019-10-29 16:47:46 -0500
commit28b9dff2eb06fb88421cf32771d380a178079fce (patch)
tree7486e2e19b0c6dcecd990ce04d3ed3340feb8eb9
parent72acdfc2acc57dd790a5a36722c126b9ab20d0eb (diff)
downloadpacket_forwarder_mtac_full-28b9dff2eb06fb88421cf32771d380a178079fce.tar.gz
packet_forwarder_mtac_full-28b9dff2eb06fb88421cf32771d380a178079fce.tar.bz2
packet_forwarder_mtac_full-28b9dff2eb06fb88421cf32771d380a178079fce.zip
Changed max tx power to not be limited to 324.0.1-mts-3
-rw-r--r--lora_pkt_fwd/src/lora_pkt_fwd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
index 5cfd28a..debb71b 100644
--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
+++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
@@ -513,12 +513,14 @@ static int parse_SX1301_configuration(const char * conf_file) {
return -1;
}
- val = json_object_get_value(conf_obj, "max_tx_power"); /* fetch value (if possible) */
- if (json_value_get_type(val) == JSONNumber && (uint8_t)json_value_get_number(val) <= 32) {
- boardconf.max_tx_power = (uint8_t)json_value_get_number(val);
- } else {
- MSG("WARNING: Data for max_tx_power is invalid, must be an integer (0-32)\n");
- boardconf.max_tx_power = 32;
+ if (fpga_supports_attenuator()) {
+ val = json_object_get_value(conf_obj, "max_tx_power"); /* fetch value (if possible) */
+ if (json_value_get_type(val) == JSONNumber) {
+ boardconf.max_tx_power = (uint8_t)json_value_get_number(val);
+ } else {
+ MSG("WARNING: Data for max_tx_power is invalid, must be an integer\n");
+ boardconf.max_tx_power = 32;
+ }
}
/* set LBT configuration */