From 3403744ef4457632b6f9a96bdf6573148b43a247 Mon Sep 17 00:00:00 2001 From: tyeth Date: Fri, 15 Nov 2024 15:03:05 +0000 Subject: [PATCH] Reduce delay + don't reinit USB MSC until after writeToBootOut --- src/provisioning/tinyusb/Wippersnapper_FS.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/provisioning/tinyusb/Wippersnapper_FS.cpp b/src/provisioning/tinyusb/Wippersnapper_FS.cpp index 4b942377..2f6326af 100644 --- a/src/provisioning/tinyusb/Wippersnapper_FS.cpp +++ b/src/provisioning/tinyusb/Wippersnapper_FS.cpp @@ -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) { @@ -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( @@ -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."); }