From 411834afba05debd071577d45ecd4f2c602954b7 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Thu, 10 Oct 2024 17:19:52 +0800 Subject: [PATCH] Fix bug sending wrong sleep command to U-Blox chips The "U-Blox readable" patch introduced a bug where sleep commands for the 10 and other versions were reversed. --- src/gps/GPS.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 33c21c5bb..74d0a6cce 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -849,7 +849,7 @@ void GPS::setPowerUBLOX(bool on, uint32_t sleepMs) } // Determine hardware version - if (gnssModel == GNSS_MODEL_UBLOX10) { + if (gnssModel != GNSS_MODEL_UBLOX10) { // Encode the sleep time in millis into the packet for (int i = 0; i < 4; i++) gps->_message_PMREQ[0 + i] = sleepMs >> (i * 8); @@ -1714,4 +1714,4 @@ void GPS::toggleGpsMode() enable(); } } -#endif // Exclude GPS \ No newline at end of file +#endif // Exclude GPS