From c91e3066598a1fa2e9ae92d292c91875c9e9e064 Mon Sep 17 00:00:00 2001 From: code8buster <20384924+code8buster@users.noreply.github.com> Date: Tue, 5 Sep 2023 11:59:34 -0400 Subject: [PATCH] Move packet scratch declaration to header --- src/gps/GPS.cpp | 1 - src/gps/GPS.h | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 6221b0ff8..8f2ce35d0 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -28,7 +28,6 @@ GPS *gps; /// Multiple GPS instances might use the same serial port (in sequence), but we can /// only init that port once. static bool didSerialInit; -uint8_t UBXscratch[250] = {0}; struct uBloxGnssModelInfo info; uint8_t uBloxProtocolVersion; diff --git a/src/gps/GPS.h b/src/gps/GPS.h index eb5459ff2..f6b4e95c8 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -106,6 +106,9 @@ class GPS : private concurrency::OSThread // Create a ublox packet for editing in memory uint8_t makeUBXPacket(uint8_t class_id, uint8_t msg_id, uint8_t payload_size, const uint8_t *msg); + // scratch space for creating ublox packets + uint8_t UBXscratch[250] = {0}; + protected: /// Do gps chipset specific init, return true for success virtual bool setupGPS(); @@ -146,9 +149,6 @@ class GPS : private concurrency::OSThread void setNumSatellites(uint8_t n); - // scratch space for creating ublox packets - uint8_t UBXscratch[250]; - private: /// Prepare the GPS for the cpu entering deep or light sleep, expect to be gone for at least 100s of msecs /// always returns 0 to indicate okay to sleep