summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarsh Sharma <harsh.sharma@multitech.com>2020-01-24 16:11:32 -0600
committerHarsh Sharma <harsh.sharma@multitech.com>2020-01-24 16:11:32 -0600
commit60296026590d64f61766896cf770e69e3bfb185c (patch)
treee00231ee25b0d233abf48eaab2d7450720681e74
parentc08bf1d60c88179d791678a2db6db61f87fea032 (diff)
downloadlora_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
-rw-r--r--libloragw/Makefile4
-rw-r--r--libloragw/inc/config.h11
-rw-r--r--libloragw/src/loragw_fpga.c3
-rw-r--r--libloragw/src/loragw_gps.c1
-rw-r--r--libloragw/tst/test_loragw_spi.c1
-rw-r--r--util_spi_stress/src/util_spi_stress.c2
6 files changed, 6 insertions, 16 deletions
diff --git a/libloragw/Makefile b/libloragw/Makefile
index 6edeb46..7e95eca 100644
--- a/libloragw/Makefile
+++ b/libloragw/Makefile
@@ -10,7 +10,7 @@ CROSS_COMPILE ?=
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
-CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -isystem =/usr/include/gps
+CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I. -isystem =/usr/include/gps -DLIBLORAGW_VERSION=\"$(LIBLORAGW_VERSION)\"
OBJDIR = obj
INCLUDES = $(wildcard inc/*.h)
@@ -31,7 +31,7 @@ clean:
### transpose library.cfg into a C header file : config.h
-inc/config.h: ../VERSION library.cfg
+inc/config.h: library.cfg
@echo "*** Checking libloragw library configuration ***"
@rm -f $@
#File initialization
diff --git a/libloragw/inc/config.h b/libloragw/inc/config.h
deleted file mode 100644
index 9b96c5f..0000000
--- a/libloragw/inc/config.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _LORAGW_CONFIGURATION_H
-#define _LORAGW_CONFIGURATION_H
- #define LIBLORAGW_VERSION "0.1-16-gc05674a"
- #define DEBUG_AUX 0
- #define DEBUG_SPI 0
- #define DEBUG_REG 0
- #define DEBUG_HAL 0
- #define DEBUG_GPS 0
- #define DEBUG_GPIO
- #define DEBUG_LBT 0
-#endif
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;
diff --git a/libloragw/tst/test_loragw_spi.c b/libloragw/tst/test_loragw_spi.c
index 9489d3c..4d06eaa 100644
--- a/libloragw/tst/test_loragw_spi.c
+++ b/libloragw/tst/test_loragw_spi.c
@@ -19,6 +19,7 @@ Maintainer: Sylvain Miermont
/* --- DEPENDANCIES --------------------------------------------------------- */
#include <stdint.h>
+#include <string.h>
#include <stdio.h>
#include <getopt.h> /* getopt_long */
diff --git a/util_spi_stress/src/util_spi_stress.c b/util_spi_stress/src/util_spi_stress.c
index c33f18f..6e703d9 100644
--- a/util_spi_stress/src/util_spi_stress.c
+++ b/util_spi_stress/src/util_spi_stress.c
@@ -25,6 +25,7 @@ Maintainer: Sylvain Miermont
#endif
#include <stdint.h> /* C99 types */
+#include <string.h> /* strncmp */
#include <stdbool.h> /* bool type */
#include <stdio.h> /* printf fprintf sprintf fopen fputs */
@@ -34,6 +35,7 @@ Maintainer: Sylvain Miermont
#include <getopt.h> /* getopt_long */
#include "loragw_reg.h"
+#include "loragw_spi.h"
/* -------------------------------------------------------------------------- */
/* --- PRIVATE MACROS ------------------------------------------------------- */