Skip to content

Commit

Permalink
Added IOTSA_DELAY_ON_BOOT, which waits so many seconds after boot. He…
Browse files Browse the repository at this point in the history
…lps with debugging on esp32c3.
  • Loading branch information
jackjansen committed Jan 5, 2025
1 parent 5bdf660 commit 91c8d4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/iotsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ IotsaApplication::setup() {
// But this means the serial port cannot be used for other things.
Serial.begin(IOTSA_SERIAL_SPEED);
IFDEBUG IotsaSerial.println("Serial opened");
#ifdef IOTSA_DELAY_ON_BOOT
IFDEBUG IotsaSerial.print("Delaying " #IOTSA_DELAY_ON_BOOT " seconds on boot...");
delay(IOTSA_DELAY_ON_BOOT*1000);
IFDEBUG IotsaSerial.print("Delayed " #IOTSA_DELAY_ON_BOOT " seconds on boot...");
#endif
IFDEBUG IotsaSerial.print("Opening " IOTSA_FS_NAME " (may take long)...");
bool ok = IOTSA_FS.begin();
IFDEBUG IotsaSerial.println(" done.");
Expand Down

0 comments on commit 91c8d4d

Please sign in to comment.