Browse Source

Fix G26 error return

Scott Lahteine 7 years ago
parent
commit
41ec449960
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      Marlin/src/gcode/bedlevel/G26.cpp

+ 13
- 13
Marlin/src/gcode/bedlevel/G26.cpp View File

483
 /**
483
 /**
484
  * Prime the nozzle if needed. Return true on error.
484
  * Prime the nozzle if needed. Return true on error.
485
  */
485
  */
486
-bool prime_nozzle() {
486
+inline bool prime_nozzle() {
487
 
487
 
488
   #if ENABLED(NEWPANEL)
488
   #if ENABLED(NEWPANEL)
489
     float Total_Prime = 0.0;
489
     float Total_Prime = 0.0;
582
     g26_bed_temp = parser.value_celsius();
582
     g26_bed_temp = parser.value_celsius();
583
     if (!WITHIN(g26_bed_temp, 15, 140)) {
583
     if (!WITHIN(g26_bed_temp, 15, 140)) {
584
       SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible.");
584
       SERIAL_PROTOCOLLNPGM("?Specified bed temperature not plausible.");
585
-      return G26_ERR;
585
+      return;
586
     }
586
     }
587
   }
587
   }
588
 
588
 
590
     g26_layer_height = parser.value_linear_units();
590
     g26_layer_height = parser.value_linear_units();
591
     if (!WITHIN(g26_layer_height, 0.0, 2.0)) {
591
     if (!WITHIN(g26_layer_height, 0.0, 2.0)) {
592
       SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible.");
592
       SERIAL_PROTOCOLLNPGM("?Specified layer height not plausible.");
593
-      return G26_ERR;
593
+      return;
594
     }
594
     }
595
   }
595
   }
596
 
596
 
599
       g26_retraction_multiplier = parser.value_float();
599
       g26_retraction_multiplier = parser.value_float();
600
       if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) {
600
       if (!WITHIN(g26_retraction_multiplier, 0.05, 15.0)) {
601
         SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible.");
601
         SERIAL_PROTOCOLLNPGM("?Specified Retraction Multiplier not plausible.");
602
-        return G26_ERR;
602
+        return;
603
       }
603
       }
604
     }
604
     }
605
     else {
605
     else {
606
       SERIAL_PROTOCOLLNPGM("?Retraction Multiplier must be specified.");
606
       SERIAL_PROTOCOLLNPGM("?Retraction Multiplier must be specified.");
607
-      return G26_ERR;
607
+      return;
608
     }
608
     }
609
   }
609
   }
610
 
610
 
612
     g26_nozzle = parser.value_float();
612
     g26_nozzle = parser.value_float();
613
     if (!WITHIN(g26_nozzle, 0.1, 1.0)) {
613
     if (!WITHIN(g26_nozzle, 0.1, 1.0)) {
614
       SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
614
       SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
615
-      return G26_ERR;
615
+      return;
616
     }
616
     }
617
   }
617
   }
618
 
618
 
622
         g26_prime_flag = -1;
622
         g26_prime_flag = -1;
623
       #else
623
       #else
624
         SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
624
         SERIAL_PROTOCOLLNPGM("?Prime length must be specified when not using an LCD.");
625
-        return G26_ERR;
625
+        return;
626
       #endif
626
       #endif
627
     }
627
     }
628
     else {
628
     else {
630
       g26_prime_length = parser.value_linear_units();
630
       g26_prime_length = parser.value_linear_units();
631
       if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
631
       if (!WITHIN(g26_prime_length, 0.0, 25.0)) {
632
         SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible.");
632
         SERIAL_PROTOCOLLNPGM("?Specified prime length not plausible.");
633
-        return G26_ERR;
633
+        return;
634
       }
634
       }
635
     }
635
     }
636
   }
636
   }
639
     g26_filament_diameter = parser.value_linear_units();
639
     g26_filament_diameter = parser.value_linear_units();
640
     if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) {
640
     if (!WITHIN(g26_filament_diameter, 1.0, 4.0)) {
641
       SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible.");
641
       SERIAL_PROTOCOLLNPGM("?Specified filament size not plausible.");
642
-      return G26_ERR;
642
+      return;
643
     }
643
     }
644
   }
644
   }
645
   g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to
645
   g26_extrusion_multiplier *= sq(1.75) / sq(g26_filament_diameter); // If we aren't using 1.75mm filament, we need to
652
     g26_hotend_temp = parser.value_celsius();
652
     g26_hotend_temp = parser.value_celsius();
653
     if (!WITHIN(g26_hotend_temp, 165, 280)) {
653
     if (!WITHIN(g26_hotend_temp, 165, 280)) {
654
       SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible.");
654
       SERIAL_PROTOCOLLNPGM("?Specified nozzle temperature not plausible.");
655
-      return G26_ERR;
655
+      return;
656
     }
656
     }
657
   }
657
   }
658
 
658
 
668
   #else
668
   #else
669
     if (!parser.seen('R')) {
669
     if (!parser.seen('R')) {
670
       SERIAL_PROTOCOLLNPGM("?(R)epeat must be specified when not using an LCD.");
670
       SERIAL_PROTOCOLLNPGM("?(R)epeat must be specified when not using an LCD.");
671
-      return G26_ERR;
671
+      return;
672
     }
672
     }
673
     else
673
     else
674
       g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
674
       g26_repeats = parser.has_value() ? parser.value_int() : GRID_MAX_POINTS + 1;
675
   #endif
675
   #endif
676
   if (g26_repeats < 1) {
676
   if (g26_repeats < 1) {
677
     SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");
677
     SERIAL_PROTOCOLLNPGM("?(R)epeat value not plausible; must be at least 1.");
678
-    return G26_ERR;
678
+    return;
679
   }
679
   }
680
 
680
 
681
   g26_x_pos = parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position[X_AXIS],
681
   g26_x_pos = parser.seenval('X') ? RAW_X_POSITION(parser.value_linear_units()) : current_position[X_AXIS],
683
 
683
 
684
   if (!position_is_reachable(g26_x_pos, g26_y_pos)) {
684
   if (!position_is_reachable(g26_x_pos, g26_y_pos)) {
685
     SERIAL_PROTOCOLLNPGM("?Specified X,Y coordinate out of bounds.");
685
     SERIAL_PROTOCOLLNPGM("?Specified X,Y coordinate out of bounds.");
686
-    return G26_ERR;
686
+    return;
687
   }
687
   }
688
 
688
 
689
   /**
689
   /**

Loading…
Cancel
Save