disable compensation transform for G30 probe
authorJim Morris <morris@wolfman.com>
Mon, 4 Jul 2016 05:53:18 +0000 (22:53 -0700)
committerJim Morris <morris@wolfman.com>
Mon, 4 Jul 2016 05:53:18 +0000 (22:53 -0700)
src/modules/tools/extruder/Extruder.cpp
src/modules/tools/zprobe/ZProbe.cpp

index 56a394f..3da3349 100644 (file)
@@ -371,11 +371,9 @@ void Extruder::on_gcode_received(void *argument)
                 for (int i = 0; i < motor_id; ++i) {
                     delta[i] = 0;
                 }
-                // HACK ALERT due to certain slicers reseting E with G92 E0 between the G10 and G11 we need to save and restore position
-                //save_position();
+
                 delta[motor_id] = -retract_length / volumetric_multiplier; // convert from mm to mm³
                 THEROBOT->delta_move(delta, retract_feedrate, motor_id + 1);
-                //restore_position();
 
                 // zlift
                 if(retract_zlift_length > 0) {
index b6e01e1..9fe64b7 100644 (file)
@@ -276,6 +276,10 @@ void ZProbe::on_gcode_received(void *argument)
             // first wait for an empty queue i.e. no moves left
             THEKERNEL->conveyor->wait_for_idle();
 
+            // turn off any compensation transform
+            auto savect= THEROBOT->compensationTransform;
+            THEROBOT->compensationTransform= nullptr;
+
             bool probe_result;
             bool reverse= (gcode->has_letter('R') && gcode->get_value('R') != 0); // specify to probe in reverse direction
             float rate= gcode->has_letter('F') ? gcode->get_value('F') / 60 : this->slow_feedrate;
@@ -312,6 +316,9 @@ void ZProbe::on_gcode_received(void *argument)
                     0));
             }
 
+            // restore compensationTransform
+            THEROBOT->compensationTransform= savect;
+
         } else {
             if(!gcode->has_letter('P')) {
                 // find the first strategy to handle the gcode