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.
pull/6579/head
Kimmo Vaisanen 2018-03-20 14:38:44 +02:00 committed by adbridge
parent db78710240
commit 153b137953
1 changed files with 2 additions and 2 deletions

View File

@ -1332,11 +1332,11 @@ void LoRaMac::reset_mac_parameters(void)
get_phy.attribute = PHY_DEF_MAX_EIRP; get_phy.attribute = PHY_DEF_MAX_EIRP;
phy_param = lora_phy->get_phy_params(&get_phy); phy_param = lora_phy->get_phy_params(&get_phy);
_params.sys_params.max_eirp = phy_param.value; _params.sys_params.max_eirp = phy_param.f_value;
get_phy.attribute = PHY_DEF_ANTENNA_GAIN; get_phy.attribute = PHY_DEF_ANTENNA_GAIN;
phy_param = lora_phy->get_phy_params(&get_phy); phy_param = lora_phy->get_phy_params(&get_phy);
_params.sys_params.antenna_gain = phy_param.value; _params.sys_params.antenna_gain = phy_param.f_value;
_params.is_node_ack_requested = false; _params.is_node_ack_requested = false;
_params.is_srv_ack_requested = false; _params.is_srv_ack_requested = false;