disable interrupts around the M504 seems to stop it crashing
authorJim Morris <morris@wolfman.com>
Sun, 23 Aug 2015 07:08:14 +0000 (00:08 -0700)
committerJim Morris <morris@wolfman.com>
Sun, 23 Aug 2015 07:08:14 +0000 (00:08 -0700)
src/modules/utils/simpleshell/SimpleShell.cpp

index 84a4838..e804266 100644 (file)
@@ -461,11 +461,13 @@ void SimpleShell::save_command( string parameters, StreamOutput *stream )
     //     return;
     // }
 
+    __disable_irq();
     // issue a M500 which will store values in the file stream
     Gcode *gcode = new Gcode("M500", gs);
     THEKERNEL->call_event(ON_GCODE_RECEIVED, gcode );
     delete gs;
     delete gcode;
+    __enable_irq();
 
     stream->printf("Settings Stored to %s\r\n", filename.c_str());
 }