diff options
author | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-24 16:11:32 -0600 |
---|---|---|
committer | Harsh Sharma <harsh.sharma@multitech.com> | 2020-01-24 16:11:32 -0600 |
commit | 60296026590d64f61766896cf770e69e3bfb185c (patch) | |
tree | e00231ee25b0d233abf48eaab2d7450720681e74 /libloragw/src/loragw_fpga.c | |
parent | c08bf1d60c88179d791678a2db6db61f87fea032 (diff) | |
download | lora_gateway_mtac_full-60296026590d64f61766896cf770e69e3bfb185c.tar.gz lora_gateway_mtac_full-60296026590d64f61766896cf770e69e3bfb185c.tar.bz2 lora_gateway_mtac_full-60296026590d64f61766896cf770e69e3bfb185c.zip |
Changed lgw version to use git describe5.0.1-mts-4
Diffstat (limited to 'libloragw/src/loragw_fpga.c')
-rw-r--r-- | libloragw/src/loragw_fpga.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libloragw/src/loragw_fpga.c b/libloragw/src/loragw_fpga.c index 906f4b5..63c6d3b 100644 --- a/libloragw/src/loragw_fpga.c +++ b/libloragw/src/loragw_fpga.c @@ -367,11 +367,10 @@ int lgw_fpga_reg_rb(uint16_t register_id, uint8_t *data, uint16_t size) { /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ int lgw_set_attenuation(uint8_t *attn) { - if (*attn < 0) { + if (*attn > 127) { return LGW_HAL_ERROR; } int i; - int32_t val; /* The max value allowed for 7 bits of a register */ uint8_t max_attn = 127; |