@@ -329,9 +329,29 @@ void beginGNSS()
329
329
delay (1000 ); // Wait for ZED-F9P to power up before it can respond to ACK
330
330
if (i2cGNSS.begin () == false )
331
331
{
332
- Serial.println (F (" u-blox GNSS not detected at default I2C address. Hard stop." ));
332
+ if (productVariant == RTK_SURVEYOR)
333
+ blinkError (ERROR_NO_I2C); // Infinite loop
334
+
333
335
displayGNSSFail (0 );
334
- blinkError (ERROR_NO_I2C);
336
+
337
+ // Present user with prompt to factory reset unit over serial
338
+ while (1 )
339
+ {
340
+ Serial.println (F (" GNSS Error: u-blox GNSS not detected at default I2C address. Press 'r' to factory reset." ));
341
+ byte incoming = getByteChoice (2 ); // Timeout after x seconds
342
+
343
+ if (incoming == ' r' )
344
+ {
345
+ Serial.println (F (" \r\n Resetting to factory defaults. Press 'y' to confirm:" ));
346
+ byte bContinue = getByteChoice (menuTimeout);
347
+ if (bContinue == ' y' )
348
+ {
349
+ factoryReset ();
350
+ }
351
+ else
352
+ Serial.println (F (" Reset aborted" ));
353
+ }
354
+ }
335
355
}
336
356
}
337
357
@@ -394,9 +414,29 @@ void configureGNSS()
394
414
395
415
if (response == false )
396
416
{
397
- Serial.println (F (" Failed to configure module. Hard stop." ));
417
+ if (productVariant == RTK_SURVEYOR)
418
+ blinkError (ERROR_GPS_CONFIG_FAIL); // Infinite loop
419
+
398
420
displayGNSSFail (0 );
399
- blinkError (ERROR_GPS_CONFIG_FAIL);
421
+
422
+ // Present user with prompt to factory reset unit over serial
423
+ while (1 )
424
+ {
425
+ Serial.println (F (" GNSS Error: Failed to configure module. Press 'r' to factory reset." ));
426
+ byte incoming = getByteChoice (2 ); // Timeout after x seconds
427
+
428
+ if (incoming == ' r' )
429
+ {
430
+ Serial.println (F (" \r\n Resetting to factory defaults. Press 'y' to confirm:" ));
431
+ byte bContinue = getByteChoice (menuTimeout);
432
+ if (bContinue == ' y' )
433
+ {
434
+ factoryReset ();
435
+ }
436
+ else
437
+ Serial.println (F (" Reset aborted" ));
438
+ }
439
+ }
400
440
}
401
441
}
402
442
0 commit comments