Skip to content

Commit

Permalink
Reduce delay + don't reinit USB MSC until after writeToBootOut
Browse files Browse the repository at this point in the history
  • Loading branch information
tyeth committed Nov 15, 2024
1 parent 2c0b752 commit 2f1cce7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/provisioning/tinyusb/Wippersnapper_FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ Wippersnapper_FS::Wippersnapper_FS() {
if (_freshFS)
{
WS_DEBUG_PRINTLN("New filesystem created! Resetting the board shortly...");
WS_PRINTER.flush();
WS.enableWDT(500);
while (1)
{
Expand Down Expand Up @@ -387,8 +386,6 @@ void Wippersnapper_FS::createSecretsFile() {
// Flush and close file
secretsFile.flush();
secretsFile.close();
delay(2500);
initUSBMSC(); // re-init USB MSC to show new file to user for editing

// Signal to user that action must be taken (edit secrets.json)
writeToBootOut(
Expand All @@ -400,6 +397,8 @@ void Wippersnapper_FS::createSecretsFile() {
"Please edit it to reflect your Adafruit IO and network credentials. "
"When you're done, press RESET on the board.");
#endif
delay(500); // previously 2500
initUSBMSC(); // re-init USB MSC to show new file to user for editing
fsHalt("ERROR: Please edit the secrets.json file. Then, reset your board.");
}

Expand Down

0 comments on commit 2f1cce7

Please sign in to comment.