From 30e5706eaa313966fe8a636606fb85cfa12aad7a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 5 Nov 2022 15:10:43 -0500 Subject: [PATCH 1/4] Fix for alpine linux builds --- src/gps/NMEAWPL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gps/NMEAWPL.h b/src/gps/NMEAWPL.h index 853c850eb..44e081bf7 100644 --- a/src/gps/NMEAWPL.h +++ b/src/gps/NMEAWPL.h @@ -3,5 +3,5 @@ #include #include "main.h" -uint printWPL(char *buf, const Position &pos, const char *name); -uint printGGA(char *buf, const Position &pos); +uin32_t printWPL(char *buf, const Position &pos, const char *name); +uin32_t printGGA(char *buf, const Position &pos); From a08ac5a47e0d21d5cd3dba20ad97e88e915ed01a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 5 Nov 2022 15:11:11 -0500 Subject: [PATCH 2/4] Update NMEAWPL.cpp --- src/gps/NMEAWPL.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gps/NMEAWPL.cpp b/src/gps/NMEAWPL.cpp index 95e69343b..d23e78182 100644 --- a/src/gps/NMEAWPL.cpp +++ b/src/gps/NMEAWPL.cpp @@ -15,7 +15,7 @@ * ------------------------------------------- */ -uint printWPL(char *buf, const Position &pos, const char *name) +uint32_t printWPL(char *buf, const Position &pos, const char *name) { uint len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name); uint chk = 0; @@ -50,9 +50,9 @@ uint printWPL(char *buf, const Position &pos, const char *name) * ------------------------------------------- */ -uint printGGA(char *buf, const Position &pos) +uint32_t printGGA(char *buf, const Position &pos) { - uint len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d", + uint32_t len = sprintf(buf, "$GNGGA,%06u.%03u,%07.2f,%c,%08.2f,%c,%u,%02u,%04u,%04d,%c,%04d,%c,%d,%04d", pos.time / 1000, pos.time % 1000, pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', @@ -67,10 +67,10 @@ uint printGGA(char *buf, const Position &pos) 0, 0); - uint chk = 0; - for (uint i = 1; i < len; i++) { + uint32_t chk = 0; + for (uint32_t i = 1; i < len; i++) { chk ^= buf[i]; } len += sprintf(buf + len, "*%02X\r\n", chk); return len; -} \ No newline at end of file +} From a7a020f431cc153932e783ef7ba35d1f44b7085a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 5 Nov 2022 15:14:08 -0500 Subject: [PATCH 3/4] Update NMEAWPL.cpp --- src/gps/NMEAWPL.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gps/NMEAWPL.cpp b/src/gps/NMEAWPL.cpp index d23e78182..666f9131b 100644 --- a/src/gps/NMEAWPL.cpp +++ b/src/gps/NMEAWPL.cpp @@ -17,8 +17,8 @@ uint32_t printWPL(char *buf, const Position &pos, const char *name) { - uint len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name); - uint chk = 0; + uint32_t len = sprintf(buf, "$GNWPL,%07.2f,%c,%08.2f,%c,%s", pos.latitude_i * 1e-5, pos.latitude_i < 0 ? 'S' : 'N', pos.longitude_i * 1e-5, pos.longitude_i < 0 ? 'W' : 'E', name); + uint32_t chk = 0; for (uint i = 1; i < len; i++) { chk ^= buf[i]; } From d641adc0fc677548753af2d1571441c27997913a Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 5 Nov 2022 15:20:09 -0500 Subject: [PATCH 4/4] Update NMEAWPL.h --- src/gps/NMEAWPL.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gps/NMEAWPL.h b/src/gps/NMEAWPL.h index 44e081bf7..aaa18933c 100644 --- a/src/gps/NMEAWPL.h +++ b/src/gps/NMEAWPL.h @@ -3,5 +3,5 @@ #include #include "main.h" -uin32_t printWPL(char *buf, const Position &pos, const char *name); -uin32_t printGGA(char *buf, const Position &pos); +uint32_t printWPL(char *buf, const Position &pos, const char *name); +uint32_t printGGA(char *buf, const Position &pos);