From 60296026590d64f61766896cf770e69e3bfb185c Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Fri, 24 Jan 2020 16:11:32 -0600 Subject: Changed lgw version to use git describe --- libloragw/src/loragw_fpga.c | 3 +-- libloragw/src/loragw_gps.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'libloragw/src') 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; -- cgit v1.2.3