From cf52bdde13512e77a3d81ca5d59e58b25136a62b Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Mon, 22 Nov 2021 10:01:50 -0600 Subject: lora gps issue hotfix --- libloragw/inc/config.h | 11 +++++++++++ libloragw/src/loragw_gps.c | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 libloragw/inc/config.h diff --git a/libloragw/inc/config.h b/libloragw/inc/config.h new file mode 100644 index 0000000..093f959 --- /dev/null +++ b/libloragw/inc/config.h @@ -0,0 +1,11 @@ +#ifndef _LORAGW_CONFIGURATION_H +#define _LORAGW_CONFIGURATION_H + #define LIBLORAGW_VERSION "5.0.6" + #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_gps.c b/libloragw/src/loragw_gps.c index 17bb3a1..329827e 100644 --- a/libloragw/src/loragw_gps.c +++ b/libloragw/src/loragw_gps.c @@ -625,7 +625,8 @@ int lgw_gps_sync(struct tref *ref, uint32_t count_us, struct timespec gps_time) ref->count_us = count_us; ref->utc.tv_sec = gps_time.tv_sec - timezone; ref->utc.tv_nsec = gps_time.tv_nsec; - ref->gps.tv_sec = gps_time.tv_sec; + // ref->gps.tv_sec = gps_time.tv_sec; + ref->gps.tv_sec = gps_time.tv_sec + 18 - 315964800; ref->gps.tv_nsec = gps_time.tv_nsec; ref->xtal_err = slope; return LGW_GPS_SUCCESS; -- cgit v1.2.3