Skip to content

Commit 00da22c

Browse files
committed
ZED : use the 13-byte cfgCfg to perform factoryDefault
The 12-byte version
1 parent eed5bcf commit 00da22c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Firmware/RTK_Everywhere/GNSS_ZED.ino

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -892,9 +892,16 @@ void GNSS_ZED::factoryReset()
892892
{
893893
if (online.gnss)
894894
{
895-
_zed->factoryDefault(); // Reset everything: baud rate, I2C address, update rate, everything. And save to BBR.
896-
delay(3000); // Allow time for CFG-CFG to be applied
897-
_zed->saveConfiguration(); // Save to Flash and BBR
895+
// Set the clearMask and loadMask to 0xFFFF. Set deviceMask to devBBR | devFlash
896+
uint8_t clearAndLoadMask[] = { 0xFF, 0xFF, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0x03 };
897+
_zed->cfgCfg(clearAndLoadMask, 13);
898+
899+
delay(2000);
900+
901+
// Set the saveMask to 0xFFFF. Set deviceMask to devBBR | devFlash
902+
uint8_t saveMask[] = { 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0, 0, 0, 0x03 };
903+
_zed->cfgCfg(saveMask, 13);
904+
898905
_zed->hardReset(); // Perform a reset leading to a cold start (zero info start-up)
899906
}
900907
}

0 commit comments

Comments
 (0)