tweak how SOLO mode is determined, may fix some obscure bugs (or not, but at least...
authorJim Morris <morris@wolfman.com>
Tue, 1 Sep 2015 05:30:14 +0000 (22:30 -0700)
committerJim Morris <morris@wolfman.com>
Tue, 1 Sep 2015 05:30:14 +0000 (22:30 -0700)
src/modules/tools/extruder/Extruder.cpp

index 29b72fe..4da5627 100644 (file)
@@ -417,8 +417,9 @@ void Extruder::on_gcode_received(void *argument)
             // Gcodes to pass along to on_gcode_execute
             THEKERNEL->conveyor->append_gcode(gcode);
 
-        }else if( this->enabled && gcode->g < 4 && gcode->has_letter('E') && !gcode->has_letter('X') && !gcode->has_letter('Y') && !gcode->has_letter('Z') ) {
-            // This is a solo move, we add an empty block to the queue to prevent subsequent gcodes being executed at the same time
+        }else if( this->enabled && gcode->g < 4 && fabsf(gcode->millimeters_of_travel) < 0.00001F ) { // With floating numbers, we can have 0 != 0, NOTE needs to be same as in Robot.cpp#745
+            // NOTE was ... gcode->has_letter('E') && !gcode->has_letter('X') && !gcode->has_letter('Y') && !gcode->has_letter('Z') ) {
+            // This is a SOLO move, we add an empty block to the queue to prevent subsequent gcodes being executed at the same time
             THEKERNEL->conveyor->append_gcode(gcode);
             THEKERNEL->conveyor->queue_head_block();
 
@@ -566,7 +567,7 @@ void Extruder::on_gcode_execute(void *argument)
                 }
 
                 // If the robot is moving, we follow it's movement, otherwise, we move alone
-                if( fabs(gcode->millimeters_of_travel) < 0.00001F ) { // With floating numbers, we can have 0 != 0, NOTE needs to be same as in Robot.cpp#701
+                if( fabs(gcode->millimeters_of_travel) < 0.00001F ) { // With floating numbers, we can have 0 != 0, NOTE needs to be same as in Robot.cpp#745
                     this->mode = SOLO;
                     this->travel_distance = relative_extrusion_distance;
                 } else {