From 77067865411448d35811d38630338eb195fee677 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 22 Feb 2024 12:59:35 -0600 Subject: [PATCH] Correct powersave settings for ublox --- src/gps/GPS.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index addde4edd1..08ef116b21 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -444,6 +444,11 @@ bool GPS::setup() if (getACK(0x06, 0x86, 500) != GNSS_RESPONSE_OK) { LOG_WARN("Unable to enable powersaving for GPS.\n"); } + msglen = makeUBXPacket(0x06, 0x3B, sizeof(_message_CFG_PM2), _message_CFG_PM2); + _serial_gps->write(UBXscratch, msglen); + if (getACK(0x06, 0x3B, 500) != GNSS_RESPONSE_OK) { + LOG_WARN("Unable to enable powersaving details for GPS.\n"); + } // For M8 we want to enable NMEA vserion 4.10 so we can see the additional sats. if (strncmp(info.hwVersion, "00080000", 8) == 0) { msglen = makeUBXPacket(0x06, 0x17, sizeof(_message_NMEA), _message_NMEA); @@ -477,6 +482,12 @@ bool GPS::setup() if (getACK(0x06, 0x11, 500) != GNSS_RESPONSE_OK) { LOG_WARN("Unable to enable powersaving mode for GPS.\n"); } + + msglen = makeUBXPacket(0x06, 0x3B, sizeof(_message_CFG_PM2), _message_CFG_PM2); + _serial_gps->write(UBXscratch, msglen); + if (getACK(0x06, 0x3B, 500) != GNSS_RESPONSE_OK) { + LOG_WARN("Unable to enable powersaving details for GPS.\n"); + } } }