Skip to content

Commit c454c1a

Browse files
author
Kimmo Vaisanen
committed
Lora: Fix resetting of max_eirp and antenna_gain values
This is a fix for issue #6391 max_eirp and antenna_gain are floating point variables. Values of these were incorrectly read from MIB as integer and therefore incorrect values were set.
1 parent f6bcbfe commit c454c1a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/lorawan/lorastack/mac/LoRaMac.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,11 +1332,11 @@ void LoRaMac::reset_mac_parameters(void)
13321332

13331333
get_phy.attribute = PHY_DEF_MAX_EIRP;
13341334
phy_param = lora_phy->get_phy_params(&get_phy);
1335-
_params.sys_params.max_eirp = phy_param.value;
1335+
_params.sys_params.max_eirp = phy_param.f_value;
13361336

13371337
get_phy.attribute = PHY_DEF_ANTENNA_GAIN;
13381338
phy_param = lora_phy->get_phy_params(&get_phy);
1339-
_params.sys_params.antenna_gain = phy_param.value;
1339+
_params.sys_params.antenna_gain = phy_param.f_value;
13401340

13411341
_params.is_node_ack_requested = false;
13421342
_params.is_srv_ack_requested = false;

0 commit comments

Comments
 (0)