diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2019-10-31 11:17:13 -0500 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2019-10-31 11:17:13 -0500 |
commit | 408ecd322635e37c710006c95a22dddc455e7f08 (patch) | |
tree | 61ed109f272710d2a50abb008a2bfd3bee697940 /libloragw/src/loragw_hal.c | |
parent | 963a35fe0d6668e5b66d6bd1ff9659be8bf7d7bd (diff) | |
download | lora_gateway_mtac_full-408ecd322635e37c710006c95a22dddc455e7f08.tar.gz lora_gateway_mtac_full-408ecd322635e37c710006c95a22dddc455e7f08.tar.bz2 lora_gateway_mtac_full-408ecd322635e37c710006c95a22dddc455e7f08.zip |
Fixed lora attenuator mode5.0.1-mts-2
Diffstat (limited to 'libloragw/src/loragw_hal.c')
-rw-r--r-- | libloragw/src/loragw_hal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libloragw/src/loragw_hal.c b/libloragw/src/loragw_hal.c index 88bd874..386bd6d 100644 --- a/libloragw/src/loragw_hal.c +++ b/libloragw/src/loragw_hal.c @@ -426,7 +426,6 @@ int lgw_board_setconf(struct lgw_conf_board_s conf) { rf_clkout = conf.clksrc; if (fpga_supports_attenuator()) { max_tx_power = conf.max_tx_power; - printf("-------MAX TX POWER %d\n", max_tx_power); DEBUG_PRINTF("Note: board configuration; lorawan_public:%d, clksrc:%d, max_tx_power:%d\n", lorawan_public, rf_clkout, max_tx_power); } else { DEBUG_PRINTF("Note: board configuration; lorawan_public:%d, clksrc:%d \n", lorawan_public, rf_clkout); @@ -1424,7 +1423,8 @@ int lgw_send(struct lgw_pkt_tx_s pkt_data) { /* Power is set to max and the attenuator brings down the level to match the packet's request */ target_mix_gain = 15; /* Mixer gain is not used for setting power*/ lgw_reg_w(LGW_TX_GAIN, 0); /* Dig gain is not used for setting power */ - x = lgw_set_attenuation((float)(max_tx_power - pkt_data.rf_power)); + float attn = (float)(max_tx_power - pkt_data.rf_power); + x = lgw_set_attenuation(&attn); if (x != LGW_HAL_SUCCESS) { DEBUG_MSG("ERROR: Failed to set attenuation value\n"); return LGW_HAL_ERROR; |