Skip to content

Commit 2f1cce7

Browse files
committed
Reduce delay + don't reinit USB MSC until after writeToBootOut
1 parent 2c0b752 commit 2f1cce7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/provisioning/tinyusb/Wippersnapper_FS.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ Wippersnapper_FS::Wippersnapper_FS() {
127127
if (_freshFS)
128128
{
129129
WS_DEBUG_PRINTLN("New filesystem created! Resetting the board shortly...");
130-
WS_PRINTER.flush();
131130
WS.enableWDT(500);
132131
while (1)
133132
{
@@ -387,8 +386,6 @@ void Wippersnapper_FS::createSecretsFile() {
387386
// Flush and close file
388387
secretsFile.flush();
389388
secretsFile.close();
390-
delay(2500);
391-
initUSBMSC(); // re-init USB MSC to show new file to user for editing
392389

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

0 commit comments

Comments
 (0)