From a8e3c37efcf82a6b0214cfc89792f2967813d45a Mon Sep 17 00:00:00 2001 From: David Ellefsen Date: Mon, 11 Mar 2024 16:06:48 +0200 Subject: [PATCH] Factory reset GNSS_MODEL_MTK GPS modules with PCAS10,3 --- src/gps/GPS.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 849c387949..651328a70e 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1168,6 +1168,11 @@ bool GPS::factoryReset() // byte _message_CFG_RST_COLDSTART[] = {0xB5, 0x62, 0x06, 0x04, 0x04, 0x00, 0xFF, 0xB9, 0x00, 0x00, 0xC6, 0x8B}; // _serial_gps->write(_message_CFG_RST_COLDSTART, sizeof(_message_CFG_RST_COLDSTART)); // delay(1000); + } else if (gnssModel == GNSS_MODEL_MTK) { + // send the CAS10 to perform a factory restart of the device (and other device that support PCAS statements) + LOG_INFO("GNSS Factory Reset via PCAS10,3\n"); + _serial_gps->write("$PCAS10,3*1F\r\n"); + delay(100); } else { // send the UBLOX Factory Reset Command regardless of detect state, something is very wrong, just assume it's UBLOX. // Factory Reset