|
32 | 32 | #define COMPILE_L_BAND //Comment out to remove L-Band functionality |
33 | 33 | #define COMPILE_SD_MMC //Comment out to remove REFERENCE_STATION microSD SD_MMC support |
34 | 34 | #define ENABLE_DEVELOPER //Uncomment this line to enable special developer modes (don't check power button at startup) |
35 | | -//#define FACTORY_RESET_AT_POWER_ON //Uncomment this line to perform a factory reset at every power-on. Needs ENABLE_DEVELOPER |
36 | | -//#define ERASE_PROFILES_AT_POWER_ON //Uncomment this line to erase _all_ profiles at power-on. Needs FACTORY_RESET_ON_POWER_ON |
37 | 35 | //#define REF_STN_GNSS_DEBUG //Uncomment this line to output GNSS library debug messages on serialGNSS. Ref Stn only. Needs ENABLE_DEVELOPER |
38 | 36 |
|
39 | 37 | //Define the RTK board identifier: |
@@ -623,69 +621,44 @@ void setup() |
623 | 621 | Serial.begin(115200); //UART0 for programming and debugging |
624 | 622 |
|
625 | 623 | identifyBoard(); //Determine what hardware platform we are running on |
626 | | - log_d("identifyBoard complete"); |
627 | 624 |
|
628 | 625 | initializePowerPins(); //Initialize any essential power pins - e.g. enable power for the Display |
629 | | - log_d("initializePowerPins complete"); |
630 | 626 |
|
631 | 627 | beginI2C(); |
632 | | - log_d("beginI2C complete"); |
633 | 628 |
|
634 | 629 | beginDisplay(); //Start display to be able to display any errors |
635 | | - log_d("beginDisplay complete"); |
636 | 630 |
|
637 | 631 | beginGNSS(); //Connect to GNSS to get module type |
638 | | - log_d("beginGNSS complete"); |
639 | 632 |
|
640 | 633 | beginFS(); //Start file system for settings |
641 | | - log_d("beginFS complete"); |
642 | 634 |
|
643 | 635 | beginBoard(); //Now finish settup up the board and check the on button |
644 | | - log_d("beginBoard complete"); |
645 | 636 |
|
646 | 637 | displaySplash(); //Display the RTK product name and firmware version |
647 | | - log_d("displaySplash complete"); |
648 | 638 |
|
649 | 639 | beginLEDs(); //LED and PWM setup |
650 | | - log_d("beginLEDs complete"); |
651 | 640 |
|
652 | 641 | beginSD(); //Test if SD is present |
653 | | - log_d("beginSD complete"); |
654 | | - |
655 | | -#if defined(ENABLE_DEVELOPER) && defined(FACTORY_RESET_AT_POWER_ON) |
656 | | - if (esp_reset_reason() == ESP_RST_POWERON) //Reset now that beginSD has been called and online.microSD will be valid |
657 | | - factoryReset(); |
658 | | -#endif |
659 | 642 |
|
660 | 643 | loadSettings(); //Attempt to load settings after SD is started so we can read the settings file if available |
661 | | - log_d("loadSettings complete"); |
662 | 644 |
|
663 | 645 | beginIdleTasks(); //Enable processor load calculations |
664 | | - log_d("beginIdleTasks complete"); |
665 | 646 |
|
666 | 647 | beginUART2(); //Start UART2 on core 0, used to receive serial from ZED and pass out over SPP |
667 | | - log_d("beginUART2 complete"); |
668 | 648 |
|
669 | 649 | beginFuelGauge(); //Configure battery fuel guage monitor |
670 | | - log_d("beginFuelGauge complete"); |
671 | 650 |
|
672 | 651 | configureGNSS(); //Configure ZED module |
673 | | - log_d("configureGNSS complete"); |
674 | 652 |
|
675 | 653 | beginAccelerometer(); |
676 | | - log_d("beginAccelerometer complete"); |
677 | 654 |
|
678 | 655 | beginLBand(); |
679 | | - log_d("beginLBand complete"); |
680 | 656 |
|
681 | 657 | beginExternalTriggers(); //Configure the time pulse output and TM2 input |
682 | | - log_d("beginExternalTriggers complete"); |
683 | 658 |
|
684 | 659 | beginSystemState(); //Determine initial system state. Start task for button monitoring. |
685 | | - log_d("beginSystemState complete"); |
686 | 660 |
|
687 | 661 | updateRTC(); //The GNSS likely has time/date. Update ESP32 RTC to match. Needed for PointPerfect key expiration. |
688 | | - log_d("updateRTC complete"); |
689 | 662 |
|
690 | 663 | Serial.flush(); //Complete any previous prints |
691 | 664 |
|
|
0 commit comments