diff options
Diffstat (limited to 'libloragw/src')
-rw-r--r-- | libloragw/src/loragw_fpga.c | 3 | ||||
-rw-r--r-- | libloragw/src/loragw_gps.c | 1 |
2 files changed, 1 insertions, 3 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; diff --git a/libloragw/src/loragw_gps.c b/libloragw/src/loragw_gps.c index 3aad031..bd728b6 100644 --- a/libloragw/src/loragw_gps.c +++ b/libloragw/src/loragw_gps.c @@ -255,7 +255,6 @@ int str_chop(char *s, int buff_size, char separator, int *idx_ary, int max_idx) int lgw_gps_enable(struct gps_data_t *gpsdata, struct fixsource_t *source) { unsigned int flags; - fd_set fds; flags = WATCH_ENABLE; flags |= WATCH_RAW; flags |= WATCH_NMEA; |