diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2018-08-09 15:10:43 -0500 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2018-08-09 15:10:43 -0500 |
commit | 1e66084295f37f0d7f5f0a3518e43ae0cc613898 (patch) | |
tree | 3b6fcae715309aeec4f39c2b59f5945a18542c18 /libloragw/inc/loragw_hal.h | |
parent | 4a262a7c7e76e118cefb0cc7569a9597f230c888 (diff) | |
download | lora_gateway_mtac_full-1e66084295f37f0d7f5f0a3518e43ae0cc613898.tar.gz lora_gateway_mtac_full-1e66084295f37f0d7f5f0a3518e43ae0cc613898.tar.bz2 lora_gateway_mtac_full-1e66084295f37f0d7f5f0a3518e43ae0cc613898.zip |
Changed attenuation setup to be the difference between the LUT power and the tx packet power and make it automatically set
Diffstat (limited to 'libloragw/inc/loragw_hal.h')
-rw-r--r-- | libloragw/inc/loragw_hal.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h index 632b72b..15bf918 100644 --- a/libloragw/inc/loragw_hal.h +++ b/libloragw/inc/loragw_hal.h @@ -282,7 +282,6 @@ struct lgw_tx_gain_s { uint8_t pa_gain; /*!> 2 bits, control of the external PA (SX1301 I/O) */ uint8_t dac_gain; /*!> 2 bits, control of the radio DAC */ uint8_t mix_gain; /*!> 4 bits, control of the radio mixer */ - float attenuation; /*!> 7 bits, control of the attenuator , in dBm */ int8_t rf_power; /*!> measured TX power at the board connector, in dBm */ }; @@ -415,6 +414,13 @@ const char* lgw_version_info(void); */ uint32_t lgw_time_on_air(struct lgw_pkt_tx_s *packet); +/** +@brief Set the attenuation for sending packets to get the exact power level +@param attenuation is in dB, it can be between 0-31.75 +@return LGW_HAL_ERROR if the operation failed, LGW_HAL_SUCCESS else +*/ +int lgw_set_attenuation(float attenuation); + #endif /* --- EOF ------------------------------------------------------------------ */ |