File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -2500,13 +2500,10 @@ void Wippersnapper::runNetFSM() {
2500
2500
*/
2501
2501
/* *************************************************************************/
2502
2502
void Wippersnapper::haltError (String error, ws_led_status_t ledStatusColor) {
2503
- #ifdef USE_TINYUSB
2504
- if (!TinyUSBDevice.mounted ()) {
2505
- TinyUSBDevice.attach (); // calling when already attached breaks SAMD
2506
- }
2507
- #endif
2508
2503
for (int i=0 ;;i++) {
2509
- WS_DEBUG_PRINT (" ERROR [WDT RESET]: " );
2504
+ WS_DEBUG_PRINT (" ERROR [WDT RESET IN " );
2505
+ WS_DEBUG_PRINT (25 - i);
2506
+ WS_DEBUG_PRINTLN (" ]: " );
2510
2507
WS_DEBUG_PRINTLN (error);
2511
2508
// let the WDT fail out and reset!
2512
2509
statusLEDSolid (ledStatusColor);
Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ Wippersnapper_FS::Wippersnapper_FS() {
106
106
// If a filesystem does not already exist - attempt to initialize a new
107
107
// filesystem
108
108
if (!initFilesystem () && !initFilesystem (true )) {
109
+ TinyUSBDevice.attach ();
109
110
setStatusLEDColor (RED);
110
111
fsHalt (" ERROR Initializing Filesystem" );
111
112
}
@@ -222,8 +223,8 @@ void Wippersnapper_FS::initUSBMSC() {
222
223
if (TinyUSBDevice.mounted ()) {
223
224
TinyUSBDevice.detach ();
224
225
delay (10 );
226
+ TinyUSBDevice.attach ();
225
227
}
226
- TinyUSBDevice.attach ();
227
228
delay (500 );
228
229
}
229
230
@@ -493,8 +494,6 @@ void Wippersnapper_FS::writeToBootOut(PGM_P str) {
493
494
*/
494
495
/* *************************************************************************/
495
496
void Wippersnapper_FS::fsHalt (String msg) {
496
- TinyUSBDevice.attach ();
497
- delay (500 );
498
497
statusLEDSolid (WS_LED_STATUS_FS_WRITE);
499
498
while (1 ) {
500
499
WS_DEBUG_PRINTLN (" Fatal Error: Halted execution!" );
You can’t perform that action at this time.
0 commit comments