summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libloragw/src/loragw_gps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libloragw/src/loragw_gps.c b/libloragw/src/loragw_gps.c
index bb37e1b..3a886f3 100644
--- a/libloragw/src/loragw_gps.c
+++ b/libloragw/src/loragw_gps.c
@@ -721,7 +721,7 @@ int lgw_cnt2utc(struct tref ref, uint32_t count_us, struct timespec *utc) {
/* calculate delta in seconds between reference count_us and target count_us
calculate rollover diff, uint32 difference is OK */
- if (count_us > ref.count_us || ((ref.count_us & 0xFF000000) == 0xFF000000) && ((count_us & 0xFF000000) == 0))
+ if (count_us > ref.count_us || ((ref.count_us & 0xFF000000) == 0xFF000000) && ((count_us & 0xFF000000) == 0)) {
delta_sec = (double)(count_us - ref.count_us) / (TS_CPS * ref.xtal_err);
} else {
delta_sec = -(double)(ref.count_us - count_us) / (TS_CPS * ref.xtal_err);