Initialize invert_probe for any command that is not G38.x
authorJames Richters <james@productionautomation.net>
Mon, 23 Apr 2018 14:27:48 +0000 (10:27 -0400)
committerJames Richters <james@productionautomation.net>
Mon, 23 Apr 2018 14:27:48 +0000 (10:27 -0400)
src/modules/tools/zprobe/ZProbe.cpp

index e16e9b8..e3154b3 100644 (file)
@@ -255,7 +255,8 @@ void ZProbe::on_gcode_received(void *argument)
     Gcode *gcode = static_cast<Gcode *>(argument);
 
     if( gcode->has_g && gcode->g >= 29 && gcode->g <= 32) {
-
+        
+        invert_probe = false;
         // make sure the probe is defined and not already triggered before moving motors
         if(!this->pin.connected()) {
             gcode->stream->printf("ZProbe pin not configured.\n");