check halted before sending on halt off
authorJim Morris <morris@wolfman.com>
Mon, 24 Oct 2016 01:39:08 +0000 (18:39 -0700)
committerJim Morris <morris@wolfman.com>
Mon, 24 Oct 2016 01:39:08 +0000 (18:39 -0700)
src/modules/utils/simpleshell/SimpleShell.cpp

index 91976ae..4b19931 100644 (file)
@@ -231,7 +231,7 @@ void SimpleShell::on_console_line_received( void *argument )
                 break;
 
             case 'H':
-                THEKERNEL->call_event(ON_HALT, (void *)1); // clears on_halt
+                if(THEKERNEL->is_halted()) THEKERNEL->call_event(ON_HALT, (void *)1); // clears on_halt
                 if(THEKERNEL->is_grbl_mode()) {
                     // issue G28.2 which is force homing cycle
                     Gcode gcode("G28.2", new_message.stream);