Skip to content

Commit 33e5845

Browse files
committed
Remove redundant log_d's. Remove redundant AT_POWER_ON's
1 parent 29450d9 commit 33e5845

File tree

4 files changed

+2
-72
lines changed

4 files changed

+2
-72
lines changed

Firmware/RTK_Surveyor/Begin.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ void identifyBoard()
3333
}
3434
}
3535

36+
//Setup any essential power pins
37+
//E.g. turn on power for the display before beginDisplay
3638
void initializePowerPins()
3739
{
38-
//Setup any essential power pins
3940
#ifdef COMPILE_SD_MMC
4041
if (productVariant == REFERENCE_STATION)
4142
{

Firmware/RTK_Surveyor/RTK_Surveyor.ino

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@
3232
#define COMPILE_L_BAND //Comment out to remove L-Band functionality
3333
#define COMPILE_SD_MMC //Comment out to remove REFERENCE_STATION microSD SD_MMC support
3434
#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
3735
//#define REF_STN_GNSS_DEBUG //Uncomment this line to output GNSS library debug messages on serialGNSS. Ref Stn only. Needs ENABLE_DEVELOPER
3836

3937
//Define the RTK board identifier:
@@ -623,69 +621,44 @@ void setup()
623621
Serial.begin(115200); //UART0 for programming and debugging
624622

625623
identifyBoard(); //Determine what hardware platform we are running on
626-
log_d("identifyBoard complete");
627624

628625
initializePowerPins(); //Initialize any essential power pins - e.g. enable power for the Display
629-
log_d("initializePowerPins complete");
630626

631627
beginI2C();
632-
log_d("beginI2C complete");
633628

634629
beginDisplay(); //Start display to be able to display any errors
635-
log_d("beginDisplay complete");
636630

637631
beginGNSS(); //Connect to GNSS to get module type
638-
log_d("beginGNSS complete");
639632

640633
beginFS(); //Start file system for settings
641-
log_d("beginFS complete");
642634

643635
beginBoard(); //Now finish settup up the board and check the on button
644-
log_d("beginBoard complete");
645636

646637
displaySplash(); //Display the RTK product name and firmware version
647-
log_d("displaySplash complete");
648638

649639
beginLEDs(); //LED and PWM setup
650-
log_d("beginLEDs complete");
651640

652641
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
659642

660643
loadSettings(); //Attempt to load settings after SD is started so we can read the settings file if available
661-
log_d("loadSettings complete");
662644

663645
beginIdleTasks(); //Enable processor load calculations
664-
log_d("beginIdleTasks complete");
665646

666647
beginUART2(); //Start UART2 on core 0, used to receive serial from ZED and pass out over SPP
667-
log_d("beginUART2 complete");
668648

669649
beginFuelGauge(); //Configure battery fuel guage monitor
670-
log_d("beginFuelGauge complete");
671650

672651
configureGNSS(); //Configure ZED module
673-
log_d("configureGNSS complete");
674652

675653
beginAccelerometer();
676-
log_d("beginAccelerometer complete");
677654

678655
beginLBand();
679-
log_d("beginLBand complete");
680656

681657
beginExternalTriggers(); //Configure the time pulse output and TM2 input
682-
log_d("beginExternalTriggers complete");
683658

684659
beginSystemState(); //Determine initial system state. Start task for button monitoring.
685-
log_d("beginSystemState complete");
686660

687661
updateRTC(); //The GNSS likely has time/date. Update ESP32 RTC to match. Needed for PointPerfect key expiration.
688-
log_d("updateRTC complete");
689662

690663
Serial.flush(); //Complete any previous prints
691664

Firmware/RTK_Surveyor/System.ino

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,18 @@ bool configureUbloxModule()
156156

157157
if (response == false)
158158
systemPrintln("Module failed config block 0");
159-
else
160-
log_d("Module config block 0 complete");
161159
response = true; //Reset
162160

163161
//Enable the constellations the user has set
164162
response &= setConstellations(true); //19 messages. Send newCfg or sendCfg with value set
165163
if (response == false)
166164
systemPrintln("Module failed config block 1");
167-
else
168-
log_d("Module config block 1 complete");
169165
response = true; //Reset
170166

171167
//Make sure the appropriate messages are enabled
172168
response &= setMessages(); //73 messages. Does a complete open/closed val set
173169
if (response == false)
174170
systemPrintln("Module failed config block 2");
175-
else
176-
log_d("Module config block 2 complete");
177171
response = true; //Reset
178172

179173
//Disable NMEA messages on all but UART1
@@ -210,8 +204,6 @@ bool configureUbloxModule()
210204

211205
if (response == false)
212206
systemPrintln("Module failed config block 3");
213-
else
214-
log_d("Module config block 3 complete");
215207

216208
if (zedModuleType == PLATFORM_F9R)
217209
{
@@ -564,11 +556,8 @@ bool setMessages()
564556
while (((x % 43) < 42) && (x < MAX_UBX_MSG)); //Limit 1st batch to 42. Batches after that will be (up to) 43 in size. It's a HHGTTG thing.
565557

566558
response &= theGNSS.sendCfgValset();
567-
log_d("sent Valset for message %d: %s", x, response ? "OK" : "ERROR");
568559
}
569560

570-
log_d("message config complete");
571-
572561
//For SPI GNSS products, we need to add each message to the GNSS Library logging buffer
573562
//to mimic UART1
574563
if (USE_SPI_GNSS)
@@ -596,11 +585,7 @@ bool setMessages()
596585
}
597586

598587
theGNSS.setRTCMLoggingMask(logRTCMMessages);
599-
log_d("setRTCMLoggingMask 0x%X", logRTCMMessages);
600588
theGNSS.setNMEALoggingMask(logNMEAMessages);
601-
log_d("setNMEALoggingMask 0x%X", logNMEAMessages);
602-
603-
log_d("logging config complete");
604589
}
605590

606591
return (response);
@@ -626,11 +611,8 @@ bool setMessagesUSB()
626611
while (((x % 43) < 42) && (x < MAX_UBX_MSG)); //Limit 1st batch to 42. Batches after that will be (up to) 43 in size. It's a HHGTTG thing.
627612

628613
response &= theGNSS.sendCfgValset();
629-
log_d("sent Valset for message %d", x);
630614
}
631615

632-
log_d("setMessagesUSB complete");
633-
634616
return (response);
635617
}
636618

Firmware/RTK_Surveyor/menuMain.ino

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,6 @@ void factoryReset()
334334

335335
sd->remove(stationCoordinateECEFFileName); //Remove station files
336336
sd->remove(stationCoordinateGeodeticFileName);
337-
338-
#if defined(ENABLE_DEVELOPER) && defined(FACTORY_RESET_AT_POWER_ON) && defined(ERASE_PROFILES_AT_POWER_ON)
339-
for (int x = 0 ; x < MAX_PROFILE_COUNT ; x++)
340-
{
341-
char fileName[56];
342-
snprintf(fileName, sizeof(fileName), "/%s_Settings_%d.txt", platformFilePrefix, x);
343-
if (sd->exists(fileName))
344-
{
345-
log_d("Removing %s from SD", fileName);
346-
sd->remove(fileName);
347-
}
348-
}
349-
#endif
350337
}
351338
#ifdef COMPILE_SD_MMC
352339
else
@@ -355,19 +342,6 @@ void factoryReset()
355342

356343
SD_MMC.remove(stationCoordinateECEFFileName); //Remove station files
357344
SD_MMC.remove(stationCoordinateGeodeticFileName);
358-
359-
#if defined(ENABLE_DEVELOPER) && defined(FACTORY_RESET_AT_POWER_ON) && defined(ERASE_PROFILES_AT_POWER_ON)
360-
for (int x = 0 ; x < MAX_PROFILE_COUNT ; x++)
361-
{
362-
char fileName[56];
363-
snprintf(fileName, sizeof(fileName), "/%s_Settings_%d.txt", platformFilePrefix, x);
364-
if (SD_MMC.exists(fileName))
365-
{
366-
log_d("Removing %s from SD", fileName);
367-
SD_MMC.remove(fileName);
368-
}
369-
}
370-
#endif
371345
}
372346
#endif
373347

0 commit comments

Comments
 (0)