Browse Source

Merge pull request #6491 from thinkyhead/rc_cleanup_wednesday

Various cleanups for recent merges
Scott Lahteine 8 years ago
parent
commit
f169c04604

+ 1
- 1
Marlin/Configuration.h View File

@@ -534,7 +534,7 @@
534 534
  * ===========================================================================
535 535
  * ============================= Z Probe Options =============================
536 536
  * ===========================================================================
537
- *    @section probes
537
+ * @section probes
538 538
  *
539 539
  *
540 540
  *   Probe Type

+ 63
- 63
Marlin/Marlin_main.cpp View File

@@ -2060,65 +2060,66 @@ static void clean_up_after_endstop_or_probe_move() {
2060 2060
   #endif
2061 2061
 
2062 2062
   #if ENABLED(BLTOUCH)
2063
+
2063 2064
     void bltouch_command(int angle) {
2064 2065
       servo[Z_ENDSTOP_SERVO_NR].move(angle);  // Give the BL-Touch the command and wait
2065 2066
       safe_delay(BLTOUCH_DELAY);
2066 2067
     }
2067 2068
 
2068
-    // 
2069
-    // The BL-Touch probes have a HAL effect sensor.  The high currents switching
2070
-    // on and off cause big magnetic fields that can affect the repeatability of the
2071
-    // sensor.  So, for BL-Touch probes, we turn off the heaters during the actual probe.
2072
-    // And then we quickly turn them back on after we have sampled the point
2073
-    //
2074
-  #if ENABLED(BLTOUCH_HEATERS_OFF)
2075
-    void turn_heaters_on_or_off_for_bltouch(const bool deploy) {
2076
-      static int8_t bltouch_recursion_cnt=0;
2077
-      static millis_t last_emi_protection=0;
2078
-      static float temps_at_entry[HOTENDS]; 
2079
-      #if HAS_TEMP_BED
2080
-        static float bed_temp_at_entry;
2081
-      #endif
2082
-
2083
-      if (deploy && bltouch_recursion_cnt>0)         // if already in the correct state, we don't need to do anything
2084
-        return;                                      // with the heaters.
2085
-      if (!deploy && bltouch_recursion_cnt<1)        // if already in the correct state, we don't need to do anything
2086
-        return;                                      // with the heaters.
2069
+    /**
2070
+     * BLTouch probes have a Hall effect sensor. The high currents switching
2071
+     * on and off cause a magnetic field that can affect the repeatability of the
2072
+     * sensor. So for BLTouch probes, heaters are turned off during the probe,
2073
+     * then quickly turned back on after the point is sampled.
2074
+     */
2075
+    #if ENABLED(BLTOUCH_HEATERS_OFF)
2087 2076
 
2088
-      if (deploy) {
2089
-        bltouch_recursion_cnt++;
2090
-        last_emi_protection = millis();
2091
-        HOTEND_LOOP() temps_at_entry[e] = thermalManager.degTargetHotend(e);        // save the current target temperatures 
2092
-        HOTEND_LOOP() thermalManager.setTargetHotend(0, e);                         // so we know what to restore them to.
2077
+      bool set_heaters_for_bltouch(const bool deploy) {
2078
+        static bool heaters_were_disabled = false;
2079
+        static millis_t next_emi_protection;
2080
+        static float temps_at_entry[HOTENDS];
2093 2081
 
2094 2082
         #if HAS_TEMP_BED
2095
-          bed_temp_at_entry = thermalManager.degTargetBed();
2096
-          thermalManager.setTargetBed(0.0);
2083
+          static float bed_temp_at_entry;
2097 2084
         #endif
2098
-      } 
2099
-      else {
2100
-        bltouch_recursion_cnt--;                                                    // the heaters are only turned back on
2101
-	if (bltouch_recursion_cnt==0 && ((last_emi_protection+20000L)>millis())) {  // if everything is perfect.  It is expected
2102
-          HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);       // that the bltouch_recursion_cnt is zero and 
2103
-          #if HAS_TEMP_BED                                                          // that the heaters were shut off less than 
2104
-            thermalManager.setTargetBed(bed_temp_at_entry);                         // 20 seconds ago
2085
+
2086
+        // If called out of order or far apart something is seriously wrong
2087
+        if (deploy == heaters_were_disabled
2088
+            || (next_emi_protection && ELAPSED(millis(), next_emi_protection)))
2089
+          kill(PSTR(MSG_KILLED));
2090
+
2091
+        if (deploy) {
2092
+          next_emi_protection = millis() + 20 * 1000UL;
2093
+          HOTEND_LOOP() {
2094
+            temps_at_entry[e] = thermalManager.degTargetHotend(e);
2095
+            thermalManager.setTargetHotend(0, e);
2096
+          }
2097
+          #if HAS_TEMP_BED
2098
+            bed_temp_at_entry = thermalManager.degTargetBed();
2099
+            thermalManager.setTargetBed(0);
2100
+          #endif
2101
+        }
2102
+        else {
2103
+          HOTEND_LOOP() thermalManager.setTargetHotend(temps_at_entry[e], e);
2104
+          #if HAS_TEMP_BED
2105
+            thermalManager.setTargetBed(bed_temp_at_entry);
2105 2106
           #endif
2106 2107
         }
2107 2108
       }
2108
-    }
2109
-    #endif
2109
+
2110
+    #endif // BLTOUCH_HEATERS_OFF
2110 2111
 
2111 2112
     void set_bltouch_deployed(const bool deploy) {
2112 2113
       #if ENABLED(BLTOUCH_HEATERS_OFF)
2113
-      turn_heaters_on_or_off_for_bltouch(deploy);
2114
+        set_heaters_for_bltouch(deploy);
2114 2115
       #endif
2115 2116
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2116
-        bltouch_command(BLTOUCH_RESET);    // try to reset it.
2117
+        bltouch_command(BLTOUCH_RESET);    //  try to reset it.
2117 2118
         bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
2118
-        bltouch_command(BLTOUCH_STOW);     // clear the triggered condition.
2119
-        safe_delay(1500);                  // wait for internal self test to complete
2120
-                                           //   measured completion time was 0.65 seconds
2121
-                                           //   after reset, deploy & stow sequence
2119
+        bltouch_command(BLTOUCH_STOW);     //  clear the triggered condition.
2120
+        safe_delay(1500);                  // Wait for internal self-test to complete.
2121
+                                           //  (Measured completion time was 0.65 seconds
2122
+                                           //   after reset, deploy, and stow sequence)
2122 2123
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2123 2124
           SERIAL_ERROR_START;
2124 2125
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
@@ -2134,7 +2135,8 @@ static void clean_up_after_endstop_or_probe_move() {
2134 2135
         }
2135 2136
       #endif
2136 2137
     }
2137
-  #endif
2138
+
2139
+  #endif // BLTOUCH
2138 2140
 
2139 2141
   // returns false for ok and true for failure
2140 2142
   bool set_probe_deployed(bool deploy) {
@@ -2146,10 +2148,8 @@ static void clean_up_after_endstop_or_probe_move() {
2146 2148
       }
2147 2149
     #endif
2148 2150
 
2149
-    #if ENABLED(BLTOUCH)
2150
-      #if ENABLED(BLTOUCH_HEATERS_OFF)
2151
-      turn_heaters_on_or_off_for_bltouch(deploy);
2152
-      #endif
2151
+    #if ENABLED(BLTOUCH) && ENABLED(BLTOUCH_HEATERS_OFF)
2152
+      set_heaters_for_bltouch(deploy);
2153 2153
     #endif
2154 2154
 
2155 2155
     if (endstops.z_probe_enabled == deploy) return false;
@@ -2330,15 +2330,15 @@ static void clean_up_after_endstop_or_probe_move() {
2330 2330
     return current_position[Z_AXIS] + zprobe_zoffset;
2331 2331
   }
2332 2332
 
2333
-  //
2334
-  // - Move to the given XY
2335
-  // - Deploy the probe, if not already deployed
2336
-  // - Probe the bed, get the Z position
2337
-  // - Depending on the 'stow' flag
2338
-  //   - Stow the probe, or
2339
-  //   - Raise to the BETWEEN height
2340
-  // - Return the probed Z position
2341
-  //
2333
+  /**
2334
+   * - Move to the given XY
2335
+   * - Deploy the probe, if not already deployed
2336
+   * - Probe the bed, get the Z position
2337
+   * - Depending on the 'stow' flag
2338
+   *   - Stow the probe, or
2339
+   *   - Raise to the BETWEEN height
2340
+   * - Return the probed Z position
2341
+   */
2342 2342
   float probe_pt(const float x, const float y, const bool stow/*=true*/, const int verbose_level/*=1*/) {
2343 2343
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2344 2344
       if (DEBUGGING(LEVELING)) {
@@ -2507,14 +2507,14 @@ static void clean_up_after_endstop_or_probe_move() {
2507 2507
 
2508 2508
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING)
2509 2509
 
2510
-  //
2511
-  // Enable if you prefer your output in JSON format
2512
-  // suitable for SCAD or JavaScript mesh visualizers.
2513
-  //
2514
-  // Visualize meshes in OpenSCAD using the included script.
2515
-  //
2516
-  //   buildroot/shared/scripts/MarlinMesh.scad
2517
-  //
2510
+  /**
2511
+   * Enable to produce output in JSON format suitable
2512
+   * for SCAD or JavaScript mesh visualizers.
2513
+   *
2514
+   * Visualize meshes in OpenSCAD using the included script.
2515
+   *
2516
+   *   buildroot/shared/scripts/MarlinMesh.scad
2517
+   */
2518 2518
   //#define SCAD_MESH_OUTPUT
2519 2519
 
2520 2520
   /**

+ 23
- 21
Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h View File

@@ -293,6 +293,7 @@
293 293
 #define HEATER_1_MAXTEMP 245
294 294
 #define HEATER_2_MAXTEMP 245
295 295
 #define HEATER_3_MAXTEMP 245
296
+#define HEATER_4_MAXTEMP 245
296 297
 #define BED_MAXTEMP 115
297 298
 
298 299
 //===========================================================================
@@ -316,13 +317,17 @@
316 317
   #define K1 0.95 //smoothing factor within the PID
317 318
 
318 319
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
319
-  
320
-    
320
+
321 321
   // FolgerTech i3-2020
322 322
   #define  DEFAULT_Kp 11.50
323 323
   #define  DEFAULT_Ki 0.50
324 324
   #define  DEFAULT_Kd 60.00
325 325
 
326
+  // Ultimaker
327
+  //#define  DEFAULT_Kp 22.2
328
+  //#define  DEFAULT_Ki 1.08
329
+  //#define  DEFAULT_Kd 114
330
+
326 331
   // MakerGear
327 332
   //#define  DEFAULT_Kp 7.0
328 333
   //#define  DEFAULT_Ki 0.1
@@ -563,7 +568,6 @@
563 568
  */
564 569
 //#define FIX_MOUNTED_PROBE
565 570
 
566
-
567 571
 /**
568 572
  *   Z Servo Probe, such as an endstop switch on a rotating arm.
569 573
  *   NUM_SERVOS also needs to be set.  This is found later in this file.  Set it to
@@ -579,7 +583,7 @@
579 583
  *   with the possible exception of Z_ENDSTOP_SERVO_NR.
580 584
  */
581 585
 //#define BLTOUCH
582
-//#define BLTOUCH_DELAY 375   // (ms) Enable and increase if needed
586
+//#define BLTOUCH_DELAY 375 // (ms) Enable and increase if needed
583 587
 //#define BLTOUCH_HEATERS_OFF // if defined the printer's heaters are turned off during probe event
584 588
 
585 589
 /**
@@ -602,7 +606,7 @@
602 606
 
603 607
 // Enable if you have a Z probe mounted on a sled like those designed by Charles Bell.
604 608
 //#define Z_PROBE_SLED
605
-//#define SLED_DOCKING_OFFSET 5 // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
609
+//#define SLED_DOCKING_OFFSET 5  // The extra distance the X axis must travel to pickup the sled. 0 should be fine but you can push it further if you'd like.
606 610
 
607 611
 /**
608 612
  *   Z Probe to nozzle (X,Y) offset, relative to (0, 0).
@@ -631,8 +635,10 @@
631 635
 #define XY_PROBE_SPEED 7500
632 636
 // Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
633 637
 #define Z_PROBE_SPEED_FAST HOMING_FEEDRATE_Z
638
+
634 639
 // Speed for the "accurate" probe of each point
635 640
 #define Z_PROBE_SPEED_SLOW (Z_PROBE_SPEED_FAST / 2)
641
+
636 642
 // Use double touch for probing
637 643
 //#define PROBE_DOUBLE_TOUCH
638 644
 
@@ -694,7 +700,6 @@
694 700
  */
695 701
 
696 702
 //#define Z_MIN_PROBE_ENDSTOP
697
-
698 703
 #define Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN
699 704
 
700 705
 // Enable Z Probe Repeatability test to see how accurate your probe is
@@ -771,7 +776,6 @@
771 776
 #define Y_HOME_DIR -1
772 777
 #define Z_HOME_DIR -1
773 778
 
774
-
775 779
 // @section machine
776 780
 
777 781
 // Travel limits after homing (units are in mm)
@@ -804,7 +808,6 @@
804 808
 //===========================================================================
805 809
 //=============================== Bed Leveling ==============================
806 810
 //===========================================================================
807
-
808 811
 // @section bedlevel
809 812
 
810 813
 /**
@@ -851,7 +854,6 @@
851 854
 #define AUTO_BED_LEVELING_UBL
852 855
 //#define MESH_BED_LEVELING
853 856
 
854
-
855 857
 /**
856 858
  * Enable detailed logging of G28, G29, M48, etc.
857 859
  * Turn on with the command 'M111 S32'.
@@ -902,7 +904,6 @@
902 904
 
903 905
   // 3 arbitrary points to probe.
904 906
   // A simple cross-product is used to estimate the plane of the bed.
905
-
906 907
   #define ABL_PROBE_PT_1_X 39
907 908
   #define ABL_PROBE_PT_1_Y 170
908 909
   #define ABL_PROBE_PT_2_X 39
@@ -918,16 +919,17 @@
918 919
   //========================= Unified Bed Leveling ============================
919 920
   //===========================================================================
920 921
 
921
-    #define UBL_MESH_INSET 1         // Mesh inset margin on print area
922
-    #define GRID_MAX_POINTS_X 10     // Don't use more than 15 points per axis, implementation limited.
923
-    #define GRID_MAX_POINTS_Y 10
924
-    #define UBL_PROBE_PT_1_X 45    // These set the probe locations for when UBL does a 3-Point leveling	
925
-    #define UBL_PROBE_PT_1_Y 170   // of the mesh.
926
-    #define UBL_PROBE_PT_2_X 45
927
-    #define UBL_PROBE_PT_2_Y 25
928
-    #define UBL_PROBE_PT_3_X 180
929
-    #define UBL_PROBE_PT_3_Y 25
930
-    #define UBL_G26_MESH_EDITING     // Enable G26 mesh editing
922
+  #define UBL_MESH_INSET 1          // Mesh inset margin on print area
923
+  #define GRID_MAX_POINTS_X 10      // Don't use more than 15 points per axis, implementation limited.
924
+  #define GRID_MAX_POINTS_Y 10
925
+  #define UBL_PROBE_PT_1_X 45       // These set the probe locations for when UBL does a 3-Point leveling
926
+  #define UBL_PROBE_PT_1_Y 170      // of the mesh.
927
+  #define UBL_PROBE_PT_2_X 45
928
+  #define UBL_PROBE_PT_2_Y 25
929
+  #define UBL_PROBE_PT_3_X 180
930
+  #define UBL_PROBE_PT_3_Y 25
931
+  #define UBL_G26_MESH_EDITING    // Enable G26 mesh editing
932
+
931 933
 #elif ENABLED(MESH_BED_LEVELING)
932 934
 
933 935
   //===========================================================================
@@ -1607,7 +1609,7 @@
1607 1609
  */
1608 1610
 //#define FILAMENT_WIDTH_SENSOR
1609 1611
 
1610
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1612
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1611 1613
 
1612 1614
 #if ENABLED(FILAMENT_WIDTH_SENSOR)
1613 1615
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)

+ 4
- 8
Marlin/example_configurations/FolgerTech-i3-2020/Configuration_adv.h View File

@@ -327,7 +327,7 @@
327 327
   // Default x offset in duplication mode (typically set to half print bed width)
328 328
   #define DEFAULT_DUPLICATION_X_OFFSET 100
329 329
 
330
-#endif //DUAL_X_CARRIAGE
330
+#endif // DUAL_X_CARRIAGE
331 331
 
332 332
 // Activate a solenoid on the active extruder with M380. Disable all with M381.
333 333
 // Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
@@ -419,7 +419,6 @@
419 419
  *    M909, M910 & LCD - only PRINTRBOARD_REVF & RIGIDBOARD_V2
420 420
  */
421 421
 //#define PWM_MOTOR_CURRENT {1300, 1300, 1250} // Values in milliamps
422
-
423 422
 //#define DIGIPOT_MOTOR_CURRENT {135,135,135,135,135} // Values 0-255 (RAMBO 135 = ~0.75A, 185 = ~1A)
424 423
 //#define DAC_MOTOR_CURRENT_DEFAULT { 70, 80, 90, 80 } // Default drive percent - X, Y, Z, E axis
425 424
 
@@ -587,10 +586,9 @@
587 586
  */
588 587
 #define BABYSTEPPING
589 588
 #if ENABLED(BABYSTEPPING)
590
-  #define BABYSTEP_XY  //not only z, but also XY in the menu. more clutter, more functions
591
-                       //not implemented for deltabots!
592
-  #define BABYSTEP_INVERT_Z false  //true for inverse movements in Z
593
-  #define BABYSTEP_MULTIPLICATOR 2 //faster movements
589
+  #define BABYSTEP_XY              // Also enable X/Y Babystepping. Not supported on DELTA!
590
+  #define BABYSTEP_INVERT_Z false  // Change if Z babysteps should go the other way
591
+  #define BABYSTEP_MULTIPLICATOR 2 // Babysteps are very small. Increase for faster motion.
594 592
   //#define BABYSTEP_ZPROBE_OFFSET // Enable to combine M851 and Babystepping
595 593
   #define DOUBLECLICK_FOR_Z_BABYSTEPPING // Double-click on the Status Screen for Z Babystepping.
596 594
   #define DOUBLECLICK_MAX_INTERVAL 1250 // Maximum interval between clicks, in milliseconds.
@@ -1034,7 +1032,6 @@
1034 1032
  * (https://github.com/ameyer/Arduino-L6470)
1035 1033
  */
1036 1034
 
1037
-
1038 1035
 //#define HAVE_L6470DRIVER
1039 1036
 #if ENABLED(HAVE_L6470DRIVER)
1040 1037
 
@@ -1155,7 +1152,6 @@
1155 1152
  */
1156 1153
 //#define EXTENDED_CAPABILITIES_REPORT
1157 1154
 
1158
-
1159 1155
 /**
1160 1156
  * Volumetric extrusion default state
1161 1157
  * Activate to make volumetric extrusion the default method,

+ 23
- 25
Marlin/example_configurations/gCreate_gMax1.5+/Configuration.h View File

@@ -130,11 +130,11 @@
130 130
 // The following define selects which electronics board you have.
131 131
 // Please choose the name from boards.h that matches your setup
132 132
 #ifndef MOTHERBOARD
133
-//#define MOTHERBOARD BOARD_RAMPS_14_EEF
133
+  //#define MOTHERBOARD BOARD_RAMPS_14_EEF
134 134
   #define MOTHERBOARD BOARD_RAMPS_14_EFB       // gMax users please note:  This is a Roxy modification.   I print on glass and
135 135
                                                // I use Marlin to control the bed's temperature.  So, if you have a single nozzle
136
-                                               // machine, this will work fine for you.  You just set the 
137
-                                               // #define TEMP_SENSOR_BED 75 to 0 down below so Marlin doesn't mess with the bed 
136
+                                               // machine, this will work fine for you.  You just set the
137
+                                               // #define TEMP_SENSOR_BED 75 to 0 down below so Marlin doesn't mess with the bed
138 138
                                                // temp.
139 139
 #endif
140 140
 
@@ -261,8 +261,8 @@
261 261
 #define TEMP_SENSOR_3 0
262 262
 #define TEMP_SENSOR_4 0
263 263
 #define TEMP_SENSOR_BED 75   // gMax-1.5+ users please note:   This is a Roxy modification to the printer.   I want
264
-                             // to print on glass.   And I'm using a 400mm x 400mm silicon heat pad powered through 
265
-                             // a Fortek SSR to do it.   If you are using an unaltered gCreate machine, this needs 
264
+                             // to print on glass.   And I'm using a 400mm x 400mm silicon heat pad powered through
265
+                             // a Fortek SSR to do it.   If you are using an unaltered gCreate machine, this needs
266 266
                              // to be set to 0
267 267
 
268 268
 // Dummy thermistor constant temperature readings, for use with 998 and 999
@@ -325,16 +325,16 @@
325 325
   #define K1 0.95 //smoothing factor within the PID
326 326
 
327 327
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
328
-  
328
+
329 329
   // gMax J-Head
330
-    #define  DEFAULT_Kp 15.35
331
-    #define  DEFAULT_Ki 0.85
332
-    #define  DEFAULT_Kd 69.45
333
-    
330
+  #define  DEFAULT_Kp 15.35
331
+  #define  DEFAULT_Ki 0.85
332
+  #define  DEFAULT_Kd 69.45
333
+
334 334
   // Ultimaker
335
-//  #define  DEFAULT_Kp 22.2
336
-//  #define  DEFAULT_Ki 1.08
337
-//  #define  DEFAULT_Kd 114
335
+  //#define  DEFAULT_Kp 22.2
336
+  //#define  DEFAULT_Ki 1.08
337
+  //#define  DEFAULT_Kd 114
338 338
 
339 339
   // MakerGear
340 340
   //#define  DEFAULT_Kp 7.0
@@ -474,7 +474,7 @@
474 474
 #define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
475 475
 #define Y_MAX_ENDSTOP_INVERTING true  // set to true to invert the logic of the endstop.
476 476
 #define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
477
-#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
477
+#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
478 478
 
479 479
 // Enable this feature if all enabled endstop pins are interrupt-capable.
480 480
 // This will remove the need to poll the interrupt pins, saving many CPU cycles.
@@ -548,7 +548,7 @@
548 548
  * ===========================================================================
549 549
  * ============================= Z Probe Options =============================
550 550
  * ===========================================================================
551
- *    @section probes
551
+ * @section probes
552 552
  *
553 553
  *
554 554
  *   Probe Type
@@ -730,8 +730,6 @@
730 730
 #define Z_CLEARANCE_DEPLOY_PROBE   15 // Z Clearance for Deploy/Stow
731 731
 #define Z_CLEARANCE_BETWEEN_PROBES  6 // Z Clearance between probe points
732 732
 
733
-//
734
-
735 733
 // For M851 give a range for adjusting the Z probe offset
736 734
 #define Z_PROBE_OFFSET_RANGE_MIN -20
737 735
 #define Z_PROBE_OFFSET_RANGE_MAX 20
@@ -792,9 +790,9 @@
792 790
 #define X_MIN_POS 0
793 791
 #define Y_MIN_POS 0
794 792
 #define Z_MIN_POS 0
795
-#define X_MAX_POS 420		// These numbers are not accurate for an unaltered gMax 1.5+ printer.  My print bed
796
-#define Y_MAX_POS 420		// is inset a noticable amount from the edge of the bed.  Combined with the inset, 
797
-                                // the nozzle can reach all cordinates of the mesh.
793
+#define X_MAX_POS 420   // These numbers are not accurate for an unaltered gMax 1.5+ printer.  My print bed
794
+#define Y_MAX_POS 420   // is inset a noticable amount from the edge of the bed.  Combined with the inset,
795
+                        // the nozzle can reach all cordinates of the mesh.
798 796
 #define Z_MAX_POS 500
799 797
 
800 798
 // If enabled, axes won't move below MIN_POS in response to movement commands.
@@ -994,8 +992,8 @@
994 992
 #define Z_SAFE_HOMING
995 993
 
996 994
 #if ENABLED(Z_SAFE_HOMING)
997
-  #define Z_SAFE_HOMING_X_POINT (((X_MIN_POS+X_MAX_POS)/2)-4) // X point for Z homing when homing all axis (G28).
998
-  #define Z_SAFE_HOMING_Y_POINT (((Y_MIN_POS+Y_MAX_POS)/2)+4) // Y point for Z homing when homing all axis (G28).
995
+  #define Z_SAFE_HOMING_X_POINT (((X_MIN_POS + X_MAX_POS) / 2) - 4) // X point for Z homing when homing all axis (G28).
996
+  #define Z_SAFE_HOMING_Y_POINT (((Y_MIN_POS + Y_MAX_POS) / 2) + 4) // Y point for Z homing when homing all axis (G28).
999 997
 #endif
1000 998
 
1001 999
 // Homing speeds (mm/m)
@@ -1035,7 +1033,7 @@
1035 1033
 //
1036 1034
 // M100 Free Memory Watcher
1037 1035
 //
1038
-#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1036
+//#define M100_FREE_MEMORY_WATCHER // uncomment to add the M100 Free Memory Watcher for debug purpose
1039 1037
 
1040 1038
 //
1041 1039
 // G20/G21 Inch mode support
@@ -1619,7 +1617,7 @@
1619 1617
  */
1620 1618
 //#define FILAMENT_WIDTH_SENSOR
1621 1619
 
1622
-#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75  //Enter the diameter (in mm) of the filament generally used (3.0 mm or 1.75 mm) - this is then used in the slicer software.  Used for sensor reading validation
1620
+#define DEFAULT_NOMINAL_FILAMENT_DIA 1.75   // (mm) Diameter of the filament generally used (3.0 or 1.75mm), also used in the slicer. Used to validate sensor reading.
1623 1621
 
1624 1622
 #if ENABLED(FILAMENT_WIDTH_SENSOR)
1625 1623
   #define FILAMENT_SENSOR_EXTRUDER_NUM 0    // Index of the extruder that has the filament sensor (0,1,2,3)
@@ -1633,6 +1631,6 @@
1633 1631
 
1634 1632
   // Display filament width on the LCD status line. Status messages will expire after 5 seconds.
1635 1633
   //#define FILAMENT_LCD_DISPLAY
1636
-#endif //FILAMENT_WIDTH_SENSOR
1634
+#endif
1637 1635
 
1638 1636
 #endif // CONFIGURATION_H

+ 1
- 1
Marlin/example_configurations/gCreate_gMax1.5+/Configuration_adv.h View File

@@ -361,7 +361,7 @@
361 361
 // Default stepper release if idle. Set to 0 to deactivate.
362 362
 // Steppers will shut down DEFAULT_STEPPER_DEACTIVE_TIME seconds after the last move when DISABLE_INACTIVE_? is true.
363 363
 // Time can be set by M18 and M84.
364
-#define DEFAULT_STEPPER_DEACTIVE_TIME 0    // usually is set to 120 seconds
364
+#define DEFAULT_STEPPER_DEACTIVE_TIME 0    // usually set to 120 seconds
365 365
 #define DISABLE_INACTIVE_X true
366 366
 #define DISABLE_INACTIVE_Y true
367 367
 #define DISABLE_INACTIVE_Z true  // set to false if the nozzle will fall down on your printed part when print has finished.

+ 64
- 66
Marlin/example_configurations/gCreate_gMax1.5+/_Bootscreen.h View File

@@ -39,72 +39,70 @@
39 39
 
40 40
 // Width: 112, Height: 64
41 41
 const unsigned char custom_start_bmp[896] PROGMEM = {
42
-	0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
43
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
44
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
45
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
46
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
47
-	0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
48
-	0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
49
-	0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
50
-	0x80, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
51
-	0x80, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01,
52
-	0x80, 0x00, 0x00, 0x01, 0xf9, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x01,
53
-	0x80, 0x00, 0x00, 0x06, 0x4d, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x01, 0xc0, 0x01,
54
-	0x80, 0x00, 0x00, 0x0c, 0x26, 0x00, 0x0e, 0xe7, 0x39, 0xd3, 0xe1, 0xf3, 0xe7, 0xc1,
55
-	0x80, 0x00, 0x00, 0x19, 0x12, 0x00, 0x0f, 0xe7, 0x39, 0xf7, 0xf3, 0xfb, 0xef, 0xe1,
56
-	0x80, 0x00, 0x00, 0x37, 0xce, 0x00, 0x0e, 0xe7, 0x01, 0xf7, 0x73, 0xb9, 0xce, 0xe1,
57
-	0x80, 0x00, 0x00, 0x64, 0x66, 0x00, 0x0e, 0xe7, 0x01, 0xc7, 0xf3, 0xb9, 0xcf, 0xe1,
58
-	0x80, 0x00, 0x00, 0x4b, 0xa6, 0x00, 0x0e, 0xe7, 0x39, 0xc7, 0xf0, 0xf9, 0xcf, 0xe1,
59
-	0x80, 0x00, 0x00, 0xca, 0xb4, 0x00, 0x0f, 0xe7, 0x39, 0xc7, 0x03, 0xf9, 0xce, 0x01,
60
-	0x80, 0x00, 0x00, 0xcd, 0xa4, 0x00, 0x06, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
61
-	0x80, 0x00, 0x03, 0xa6, 0x6c, 0x00, 0x00, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
62
-	0x80, 0x00, 0xff, 0x13, 0xd8, 0x00, 0x0e, 0xe3, 0xf1, 0xc7, 0xf3, 0xf9, 0xef, 0xe1,
63
-	0x80, 0x01, 0x21, 0x88, 0x18, 0x00, 0x0f, 0xe1, 0xe1, 0xc3, 0xe1, 0xb9, 0xe7, 0xc1,
64
-	0x80, 0x06, 0x61, 0x16, 0x30, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
65
-	0x80, 0x04, 0x41, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
66
-	0x80, 0x04, 0xfe, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
67
-	0x80, 0x0b, 0x86, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
68
-	0x80, 0x1e, 0x01, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
69
-	0x80, 0x1c, 0x07, 0x22, 0x00, 0x00, 0x07, 0xbc, 0x3f, 0x9f, 0x81, 0xf8, 0xf1, 0xe1,
70
-	0x80, 0x08, 0x1f, 0xe2, 0x00, 0x00, 0x0f, 0xfc, 0x3f, 0xbf, 0x87, 0xfe, 0x71, 0xc1,
71
-	0x80, 0x00, 0x33, 0x62, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
72
-	0x80, 0x00, 0xc2, 0x22, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
73
-	0x80, 0x00, 0xc2, 0x3e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x80, 0x7e, 0x3b, 0x81,
74
-	0x80, 0x01, 0xe6, 0x1e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x83, 0xfe, 0x3f, 0x81,
75
-	0x80, 0x01, 0x3c, 0x12, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x87, 0x9e, 0x3b, 0x81,
76
-	0x80, 0x01, 0x1c, 0x26, 0x00, 0x00, 0x0f, 0xfc, 0x3d, 0xf7, 0x87, 0x9e, 0x7b, 0xc1,
77
-	0x80, 0x01, 0x70, 0x64, 0x00, 0x00, 0x07, 0xbc, 0x3c, 0xe7, 0x87, 0x9e, 0x7b, 0xc1,
78
-	0x80, 0x03, 0xc0, 0x58, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0xe7, 0x87, 0xfe, 0x71, 0xc1,
79
-	0x80, 0x0d, 0x80, 0xf0, 0x00, 0x00, 0x0f, 0x3c, 0x3c, 0xe7, 0x83, 0xde, 0xf1, 0xe1,
80
-	0x80, 0x1a, 0x00, 0xe0, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
81
-	0x80, 0x26, 0x00, 0x40, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
82
-	0x80, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
83
-	0x80, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
42
+  0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
43
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
44
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
45
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
46
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
47
+  0x80, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
48
+  0x80, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
49
+  0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
50
+  0x80, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
51
+  0x80, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01,
52
+  0x80, 0x00, 0x00, 0x01, 0xf9, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x01, 0xc0, 0x01,
53
+  0x80, 0x00, 0x00, 0x06, 0x4d, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 0x01, 0xc0, 0x01,
54
+  0x80, 0x00, 0x00, 0x0c, 0x26, 0x00, 0x0e, 0xe7, 0x39, 0xd3, 0xe1, 0xf3, 0xe7, 0xc1,
55
+  0x80, 0x00, 0x00, 0x19, 0x12, 0x00, 0x0f, 0xe7, 0x39, 0xf7, 0xf3, 0xfb, 0xef, 0xe1,
56
+  0x80, 0x00, 0x00, 0x37, 0xce, 0x00, 0x0e, 0xe7, 0x01, 0xf7, 0x73, 0xb9, 0xce, 0xe1,
57
+  0x80, 0x00, 0x00, 0x64, 0x66, 0x00, 0x0e, 0xe7, 0x01, 0xc7, 0xf3, 0xb9, 0xcf, 0xe1,
58
+  0x80, 0x00, 0x00, 0x4b, 0xa6, 0x00, 0x0e, 0xe7, 0x39, 0xc7, 0xf0, 0xf9, 0xcf, 0xe1,
59
+  0x80, 0x00, 0x00, 0xca, 0xb4, 0x00, 0x0f, 0xe7, 0x39, 0xc7, 0x03, 0xf9, 0xce, 0x01,
60
+  0x80, 0x00, 0x00, 0xcd, 0xa4, 0x00, 0x06, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
61
+  0x80, 0x00, 0x03, 0xa6, 0x6c, 0x00, 0x00, 0xe7, 0x39, 0xc7, 0x73, 0xb9, 0xce, 0xe1,
62
+  0x80, 0x00, 0xff, 0x13, 0xd8, 0x00, 0x0e, 0xe3, 0xf1, 0xc7, 0xf3, 0xf9, 0xef, 0xe1,
63
+  0x80, 0x01, 0x21, 0x88, 0x18, 0x00, 0x0f, 0xe1, 0xe1, 0xc3, 0xe1, 0xb9, 0xe7, 0xc1,
64
+  0x80, 0x06, 0x61, 0x16, 0x30, 0x00, 0x07, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
65
+  0x80, 0x04, 0x41, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
66
+  0x80, 0x04, 0xfe, 0x41, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
67
+  0x80, 0x0b, 0x86, 0x8f, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
68
+  0x80, 0x1e, 0x01, 0x9a, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1f, 0x80, 0x00, 0x00, 0x01,
69
+  0x80, 0x1c, 0x07, 0x22, 0x00, 0x00, 0x07, 0xbc, 0x3f, 0x9f, 0x81, 0xf8, 0xf1, 0xe1,
70
+  0x80, 0x08, 0x1f, 0xe2, 0x00, 0x00, 0x0f, 0xfc, 0x3f, 0xbf, 0x87, 0xfe, 0x71, 0xc1,
71
+  0x80, 0x00, 0x33, 0x62, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
72
+  0x80, 0x00, 0xc2, 0x22, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xb7, 0x87, 0x9e, 0x7b, 0xc1,
73
+  0x80, 0x00, 0xc2, 0x3e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x80, 0x7e, 0x3b, 0x81,
74
+  0x80, 0x01, 0xe6, 0x1e, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x83, 0xfe, 0x3f, 0x81,
75
+  0x80, 0x01, 0x3c, 0x12, 0x00, 0x00, 0x0f, 0x3c, 0x3d, 0xf7, 0x87, 0x9e, 0x3b, 0x81,
76
+  0x80, 0x01, 0x1c, 0x26, 0x00, 0x00, 0x0f, 0xfc, 0x3d, 0xf7, 0x87, 0x9e, 0x7b, 0xc1,
77
+  0x80, 0x01, 0x70, 0x64, 0x00, 0x00, 0x07, 0xbc, 0x3c, 0xe7, 0x87, 0x9e, 0x7b, 0xc1,
78
+  0x80, 0x03, 0xc0, 0x58, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0xe7, 0x87, 0xfe, 0x71, 0xc1,
79
+  0x80, 0x0d, 0x80, 0xf0, 0x00, 0x00, 0x0f, 0x3c, 0x3c, 0xe7, 0x83, 0xde, 0xf1, 0xe1,
80
+  0x80, 0x1a, 0x00, 0xe0, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
81
+  0x80, 0x26, 0x00, 0x40, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
82
+  0x80, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
83
+  0x80, 0xb2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
84 84
 
85
-	0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x03, 0xc0, 0x20, 0x10, 0x00, 0x01,
86
-	0x83, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x20, 0x00, 0x10, 0x00, 0x01,
87
-	0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x23, 0x27, 0x39, 0x8c, 0xe1,
88
-	0x06, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x03, 0xc2, 0x24, 0x92, 0x49, 0x01,
89
-	0x04, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x02, 0x24, 0x93, 0xc8, 0xc1,
90
-	0x0d, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x02, 0x24, 0x92, 0x08, 0x21,
91
-	0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x02, 0x02, 0x24, 0x99, 0xc9, 0xc1,
92
-	0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
85
+  0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x03, 0xc0, 0x20, 0x10, 0x00, 0x01,
86
+  0x83, 0x24, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x20, 0x00, 0x10, 0x00, 0x01,
87
+  0x02, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x23, 0x27, 0x39, 0x8c, 0xe1,
88
+  0x06, 0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x03, 0xc2, 0x24, 0x92, 0x49, 0x01,
89
+  0x04, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x02, 0x02, 0x24, 0x93, 0xc8, 0xc1,
90
+  0x0d, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x08, 0x92, 0x02, 0x02, 0x24, 0x92, 0x08, 0x21,
91
+  0x08, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x02, 0x02, 0x24, 0x99, 0xc9, 0xc1,
92
+  0x18, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
93 93
 
94
-	0x10, 0x30, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x0f, 0xe0, 0x0f, 0x00, 0x01,
95
-	0x30, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
96
-	0x20, 0x30, 0x00, 0x6d, 0x80, 0x00, 0x00, 0x12, 0x24, 0x09, 0x88, 0x09, 0x00, 0x01,
97
-	0x10, 0x18, 0x1f, 0x60, 0xc0, 0x00, 0x00, 0x12, 0x24, 0x09, 0x48, 0x09, 0x00, 0x01,
98
-	0x30, 0x0c, 0x39, 0xe0, 0x60, 0x00, 0x00, 0x12, 0x24, 0x09, 0x90, 0x09, 0x00, 0x01,
99
-	0x30, 0x07, 0x90, 0x70, 0x60, 0x00, 0x00, 0x12, 0x24, 0x08, 0x60, 0x09, 0x00, 0x01,
100
-	0x10, 0x16, 0xf0, 0x18, 0x20, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
101
-	0x1a, 0x10, 0x60, 0x08, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0xc8, 0x09, 0x00, 0x01,
102
-	0x0b, 0x09, 0x80, 0x00, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x01,
103
-	0x0e, 0x07, 0x80, 0x00, 0x10, 0x00, 0x00, 0x13, 0xe4, 0x89, 0xc4, 0x89, 0xf9, 0x01,
104
-	0x06, 0x1e, 0x40, 0x10, 0x10, 0x00, 0x00, 0x10, 0x05, 0xc8, 0x09, 0xc8, 0x0b, 0x81,
105
-	0x06, 0x00, 0x40, 0x20, 0x10, 0x00, 0x00, 0x0f, 0xf8, 0x8f, 0xf0, 0x8f, 0xf9, 0x01,
106
-	0x03, 0x80, 0x00, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
107
-	0x01, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
94
+  0x10, 0x30, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x0f, 0xe0, 0x0f, 0x00, 0x01,
95
+  0x30, 0x20, 0x00, 0x37, 0x00, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
96
+  0x20, 0x30, 0x00, 0x6d, 0x80, 0x00, 0x00, 0x12, 0x24, 0x09, 0x88, 0x09, 0x00, 0x01,
97
+  0x10, 0x18, 0x1f, 0x60, 0xc0, 0x00, 0x00, 0x12, 0x24, 0x09, 0x48, 0x09, 0x00, 0x01,
98
+  0x30, 0x0c, 0x39, 0xe0, 0x60, 0x00, 0x00, 0x12, 0x24, 0x09, 0x90, 0x09, 0x00, 0x01,
99
+  0x30, 0x07, 0x90, 0x70, 0x60, 0x00, 0x00, 0x12, 0x24, 0x08, 0x60, 0x09, 0x00, 0x01,
100
+  0x10, 0x16, 0xf0, 0x18, 0x20, 0x00, 0x00, 0x12, 0x24, 0x08, 0x10, 0x09, 0x00, 0x01,
101
+  0x1a, 0x10, 0x60, 0x08, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0xc8, 0x09, 0x00, 0x01,
102
+  0x0b, 0x09, 0x80, 0x00, 0x30, 0x00, 0x00, 0x12, 0x24, 0x09, 0x24, 0x09, 0x00, 0x01,
103
+  0x0e, 0x07, 0x80, 0x00, 0x10, 0x00, 0x00, 0x13, 0xe4, 0x89, 0xc4, 0x89, 0xf9, 0x01,
104
+  0x06, 0x1e, 0x40, 0x10, 0x10, 0x00, 0x00, 0x10, 0x05, 0xc8, 0x09, 0xc8, 0x0b, 0x81,
105
+  0x06, 0x00, 0x40, 0x20, 0x10, 0x00, 0x00, 0x0f, 0xf8, 0x8f, 0xf0, 0x8f, 0xf9, 0x01,
106
+  0x03, 0x80, 0x00, 0x20, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
107
+  0x01, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
108 108
 };
109
-
110
-

+ 3
- 0
Marlin/language_en.h View File

@@ -408,6 +408,9 @@
408 408
 #ifndef MSG_ZPROBE_OUT
409 409
   #define MSG_ZPROBE_OUT                      _UxGT("Z probe out. bed")
410 410
 #endif
411
+#ifndef MSG_BLTOUCH
412
+  #define MSG_BLTOUCH                         _UxGT("BLTouch")
413
+#endif
411 414
 #ifndef MSG_BLTOUCH_SELFTEST
412 415
   #define MSG_BLTOUCH_SELFTEST                _UxGT("BLTouch Self-Test")
413 416
 #endif

+ 1
- 1
Marlin/language_tr.h View File

@@ -233,7 +233,7 @@
233 233
 #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE  _UxGT("Daha Akıt")                                          // Daha Akıt
234 234
 #define MSG_FILAMENT_CHANGE_OPTION_RESUME   _UxGT("Baskıyı sürdür")                                     // Baskıyı sürdür
235 235
 #define MSG_FILAMENT_CHANGE_MINTEMP         _UxGT("Min. Sıcaklık")                                      // Min. Sıcaklık:
236
-#define MSG_FILAMENT_CHANGE_NOZZLE          _UxGT("  Nozül: ")                                          //   Nozül: 
236
+#define MSG_FILAMENT_CHANGE_NOZZLE          _UxGT("  Nozül: ")                                          //   Nozül:
237 237
 
238 238
 #if LCD_HEIGHT >= 4
239 239
   // Up to 3 lines allowed

+ 36
- 48
Marlin/least_squares_fit.cpp View File

@@ -21,13 +21,13 @@
21 21
  */
22 22
 
23 23
 /**
24
- * Least Squares Best Fit  By Roxy and Ed Williams
24
+ * Least Squares Best Fit by Roxy and Ed Williams
25 25
  *
26 26
  * This algorithm is high speed and has a very small code footprint.
27 27
  * Its results are identical to both the Iterative Least-Squares published
28 28
  * earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE
29
- * it saves roughly 10K of program memory.   It also does not require all of 
30
- * coordinates to be present during the calculations.  Each point can be 
29
+ * it saves roughly 10K of program memory. It also does not require all of
30
+ * coordinates to be present during the calculations. Each point can be
31 31
  * probed and then discarded.
32 32
  *
33 33
  */
@@ -41,56 +41,44 @@
41 41
 
42 42
 #include "least_squares_fit.h"
43 43
 
44
-void incremental_LSF_reset(struct linear_fit_data *lsf) {
45
-	lsf->n = 0;
46
-	lsf->A = 0.0;					// probably a memset() can be done to zero 
47
-	lsf->B = 0.0;                                   // this whole structure
48
-	lsf->D = 0.0;
49
-	lsf->xbar = lsf->ybar = lsf->zbar = 0.0;
50
-	lsf->x2bar = lsf->y2bar = lsf->z2bar = 0.0;
51
-	lsf->xybar = lsf->xzbar = lsf->yzbar = 0.0;
52
-	lsf->max_absx = lsf->max_absy = 0.0;
53
-    }
44
+void incremental_LSF_reset(struct linear_fit_data *lsf) { ZERO(lsf); }
54 45
 
55 46
 void incremental_LSF(struct linear_fit_data *lsf, float x, float y, float z) {
56
-	lsf->xbar += x;
57
-	lsf->ybar += y;
58
-	lsf->zbar += z;
59
-	lsf->x2bar += x*x;
60
-	lsf->y2bar += y*y;
61
-	lsf->z2bar += z*z;
62
-	lsf->xybar += x*y;
63
-	lsf->xzbar += x*z;
64
-	lsf->yzbar += y*z;
65
-	lsf->max_absx = (fabs(x) > lsf->max_absx) ? fabs(x) : lsf->max_absx;
66
-	lsf->max_absy = (fabs(y) > lsf->max_absy) ? fabs(y) : lsf->max_absy;
67
-	lsf->n++;
68
-	return;
69
-  }
47
+  lsf->xbar += x;
48
+  lsf->ybar += y;
49
+  lsf->zbar += z;
50
+  lsf->x2bar += sq(x);
51
+  lsf->y2bar += sq(y);
52
+  lsf->z2bar += sq(z);
53
+  lsf->xybar += sq(x);
54
+  lsf->xzbar += sq(x);
55
+  lsf->yzbar += sq(y);
56
+  lsf->max_absx = max(fabs(x), lsf->max_absx);
57
+  lsf->max_absy = max(fabs(y), lsf->max_absy);
58
+  lsf->n++;
59
+}
70 60
 
71 61
 int finish_incremental_LSF(struct linear_fit_data *lsf) {
72
-	float DD, N;
62
+  const float N = (float)lsf->n;
73 63
 
74
-	N = (float) lsf->n;
75
-	lsf->xbar /= N;
76
-	lsf->ybar /= N;
77
-	lsf->zbar /= N;
78
-	lsf->x2bar = lsf->x2bar/N - lsf->xbar*lsf->xbar;
79
-	lsf->y2bar = lsf->y2bar/N - lsf->ybar*lsf->ybar;
80
-	lsf->z2bar = lsf->z2bar/N - lsf->zbar*lsf->zbar;
81
-	lsf->xybar = lsf->xybar/N - lsf->xbar*lsf->ybar;
82
-	lsf->yzbar = lsf->yzbar/N - lsf->ybar*lsf->zbar;
83
-	lsf->xzbar = lsf->xzbar/N - lsf->xbar*lsf->zbar;
64
+  lsf->xbar /= N;
65
+  lsf->ybar /= N;
66
+  lsf->zbar /= N;
67
+  lsf->x2bar = lsf->x2bar / N - lsf->xbar * lsf->xbar;
68
+  lsf->y2bar = lsf->y2bar / N - lsf->ybar * lsf->ybar;
69
+  lsf->z2bar = lsf->z2bar / N - lsf->zbar * lsf->zbar;
70
+  lsf->xybar = lsf->xybar / N - lsf->xbar * lsf->ybar;
71
+  lsf->yzbar = lsf->yzbar / N - lsf->ybar * lsf->zbar;
72
+  lsf->xzbar = lsf->xzbar / N - lsf->xbar * lsf->zbar;
84 73
 
85
-	DD = lsf->x2bar*lsf->y2bar - lsf->xybar*lsf->xybar;
86
-	if (fabs(DD) <= 1e-10*(lsf->max_absx+lsf->max_absy)) 
87
-	  return -1;
88
-	
89
-	lsf->A = (lsf->yzbar*lsf->xybar - lsf->xzbar*lsf->y2bar) / DD;
90
-	lsf->B = (lsf->xzbar*lsf->xybar - lsf->yzbar*lsf->x2bar) / DD;
91
-	lsf->D = -(lsf->zbar + lsf->A*lsf->xbar + lsf->B*lsf->ybar);
92
-	return 0;
93
-}
94
-#endif
74
+  const float DD = lsf->x2bar * lsf->y2bar - sq(lsf->xybar);
75
+  if (fabs(DD) <= 1e-10 * (lsf->max_absx + lsf->max_absy))
76
+    return -1;
95 77
 
78
+  lsf->A = (lsf->yzbar * lsf->xybar - lsf->xzbar * lsf->y2bar) / DD;
79
+  lsf->B = (lsf->xzbar * lsf->xybar - lsf->yzbar * lsf->x2bar) / DD;
80
+  lsf->D = -(lsf->zbar + lsf->A * lsf->xbar + lsf->B * lsf->ybar);
81
+  return 0;
82
+}
96 83
 
84
+#endif // AUTO_BED_LEVELING_UBL

+ 7
- 7
Marlin/least_squares_fit.h View File

@@ -27,7 +27,7 @@
27 27
  * Its results are identical to both the Iterative Least-Squares published
28 28
  * earlier by Roxy and the QR_SOLVE solution. If used in place of QR_SOLVE
29 29
  * it saves roughly 10K of program memory.   And even better...  the data
30
- * fed into the algorithm does not need to all be present at the same time.  
30
+ * fed into the algorithm does not need to all be present at the same time.
31 31
  * A point can be probed and its values fed into the algorithm and then discarded.
32 32
  *
33 33
  */
@@ -42,14 +42,14 @@
42 42
 
43 43
 struct linear_fit_data {
44 44
   int n;
45
-  float xbar, ybar, zbar;
46
-  float x2bar, y2bar, z2bar;
47
-  float xybar, xzbar, yzbar;
48
-  float max_absx, max_absy;
49
-  float A, B, D;
45
+  float xbar, ybar, zbar,
46
+        x2bar, y2bar, z2bar,
47
+        xybar, xzbar, yzbar,
48
+        max_absx, max_absy,
49
+        A, B, D;
50 50
 };
51 51
 
52
-void incremental_LSF_reset(struct linear_fit_data *); 
52
+void incremental_LSF_reset(struct linear_fit_data *);
53 53
 void incremental_LSF(struct linear_fit_data *, float x, float y, float z);
54 54
 int finish_incremental_LSF(struct linear_fit_data *);
55 55
 

+ 6
- 6
Marlin/softspi.h View File

@@ -19,11 +19,11 @@ bool fastDigitalRead(uint8_t pin) {
19 19
  */
20 20
 static inline __attribute__((always_inline))
21 21
 void fastDigitalWrite(uint8_t pin, bool value) {
22
-	if (value) {
23
-		*portSetRegister(pin) = 1;
24
-	} else {
25
-		*portClearRegister(pin) = 1;
26
-	}
22
+  if (value) {
23
+    *portSetRegister(pin) = 1;
24
+  } else {
25
+    *portClearRegister(pin) = 1;
26
+  }
27 27
 }
28 28
 #else  // CORE_TEENSY
29 29
 //------------------------------------------------------------------------------
@@ -574,7 +574,7 @@ class DigitalPin {
574 574
   /** Parenthesis operator
575 575
    * @return Pin's level
576 576
    */
577
-	inline operator bool () const __attribute__((always_inline)) {
577
+  inline operator bool () const __attribute__((always_inline)) {
578 578
     return read();
579 579
   }
580 580
   //----------------------------------------------------------------------------

+ 22
- 50
Marlin/ubl.h View File

@@ -91,11 +91,6 @@
91 91
 
92 92
     public:
93 93
 
94
-//
95
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
96
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
97
-// functions that call STATIC functions.
98
-//
99 94
       void find_mean_mesh_height();
100 95
       void shift_mesh_height();
101 96
       void probe_entire_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map, const bool stow_probe, bool do_furthest);
@@ -104,23 +99,13 @@
104 99
       void manually_probe_remaining_mesh(const float &lx, const float &ly, const float &z_clearance, const float &card_thickness, const bool do_ubl_mesh_map);
105 100
       void save_ubl_active_state_and_disable();
106 101
       void restore_ubl_active_state_and_leave();
107
-      void g29_what_command(); 
108
-//
109
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
110
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
111
-// functions that call STATIC functions.
112
-//
102
+      void g29_what_command();
113 103
       void g29_eeprom_dump() ;
114 104
       void g29_compare_current_mesh_to_stored_mesh();
115 105
       void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map);
116 106
       void smart_fill_mesh();
117 107
       void display_map(const int);
118 108
       void reset();
119
-//
120
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
121
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
122
-// functions that call STATIC functions.
123
-//
124 109
       void invalidate();
125 110
       void store_state();
126 111
       void load_state();
@@ -134,25 +119,27 @@
134 119
 
135 120
       // 15 is the maximum nubmer of grid points supported + 1 safety margin for now,
136 121
       // until determinism prevails
137
-      constexpr static float mesh_index_to_xpos[16] PROGMEM = { UBL_MESH_MIN_X+0*(MESH_X_DIST),
138
-                                UBL_MESH_MIN_X+1*(MESH_X_DIST), UBL_MESH_MIN_X+2*(MESH_X_DIST),
139
-                                UBL_MESH_MIN_X+3*(MESH_X_DIST), UBL_MESH_MIN_X+4*(MESH_X_DIST),
140
-                                UBL_MESH_MIN_X+5*(MESH_X_DIST), UBL_MESH_MIN_X+6*(MESH_X_DIST),
141
-                                UBL_MESH_MIN_X+7*(MESH_X_DIST), UBL_MESH_MIN_X+8*(MESH_X_DIST),
142
-                                UBL_MESH_MIN_X+9*(MESH_X_DIST), UBL_MESH_MIN_X+10*(MESH_X_DIST),
143
-                                UBL_MESH_MIN_X+11*(MESH_X_DIST), UBL_MESH_MIN_X+12*(MESH_X_DIST),
144
-                                UBL_MESH_MIN_X+13*(MESH_X_DIST), UBL_MESH_MIN_X+14*(MESH_X_DIST),
145
-                                UBL_MESH_MIN_X+15*(MESH_X_DIST) };
146
-
147
-      constexpr static float mesh_index_to_ypos[16] PROGMEM = { UBL_MESH_MIN_Y+0*(MESH_Y_DIST),
148
-                                UBL_MESH_MIN_Y+1*(MESH_Y_DIST), UBL_MESH_MIN_Y+2*(MESH_Y_DIST),
149
-                                UBL_MESH_MIN_Y+3*(MESH_Y_DIST), UBL_MESH_MIN_Y+4*(MESH_Y_DIST),
150
-                                UBL_MESH_MIN_Y+5*(MESH_Y_DIST), UBL_MESH_MIN_Y+6*(MESH_Y_DIST),
151
-                                UBL_MESH_MIN_Y+7*(MESH_Y_DIST), UBL_MESH_MIN_Y+8*(MESH_Y_DIST),
152
-                                UBL_MESH_MIN_Y+9*(MESH_Y_DIST), UBL_MESH_MIN_Y+10*(MESH_Y_DIST),
153
-                                UBL_MESH_MIN_Y+11*(MESH_Y_DIST), UBL_MESH_MIN_Y+12*(MESH_Y_DIST),
154
-                                UBL_MESH_MIN_Y+13*(MESH_Y_DIST), UBL_MESH_MIN_Y+14*(MESH_Y_DIST),
155
-                                UBL_MESH_MIN_Y+15*(MESH_Y_DIST) };
122
+      constexpr static float mesh_index_to_xpos[16] PROGMEM = {
123
+                                UBL_MESH_MIN_X +  0 * (MESH_X_DIST), UBL_MESH_MIN_X +  1 * (MESH_X_DIST),
124
+                                UBL_MESH_MIN_X +  2 * (MESH_X_DIST), UBL_MESH_MIN_X +  3 * (MESH_X_DIST),
125
+                                UBL_MESH_MIN_X +  4 * (MESH_X_DIST), UBL_MESH_MIN_X +  5 * (MESH_X_DIST),
126
+                                UBL_MESH_MIN_X +  6 * (MESH_X_DIST), UBL_MESH_MIN_X +  7 * (MESH_X_DIST),
127
+                                UBL_MESH_MIN_X +  8 * (MESH_X_DIST), UBL_MESH_MIN_X +  9 * (MESH_X_DIST),
128
+                                UBL_MESH_MIN_X + 10 * (MESH_X_DIST), UBL_MESH_MIN_X + 11 * (MESH_X_DIST),
129
+                                UBL_MESH_MIN_X + 12 * (MESH_X_DIST), UBL_MESH_MIN_X + 13 * (MESH_X_DIST),
130
+                                UBL_MESH_MIN_X + 14 * (MESH_X_DIST), UBL_MESH_MIN_X + 15 * (MESH_X_DIST)
131
+                              };
132
+
133
+      constexpr static float mesh_index_to_ypos[16] PROGMEM = {
134
+                                UBL_MESH_MIN_Y +  0 * (MESH_Y_DIST), UBL_MESH_MIN_Y +  1 * (MESH_Y_DIST),
135
+                                UBL_MESH_MIN_Y +  2 * (MESH_Y_DIST), UBL_MESH_MIN_Y +  3 * (MESH_Y_DIST),
136
+                                UBL_MESH_MIN_Y +  4 * (MESH_Y_DIST), UBL_MESH_MIN_Y +  5 * (MESH_Y_DIST),
137
+                                UBL_MESH_MIN_Y +  6 * (MESH_Y_DIST), UBL_MESH_MIN_Y +  7 * (MESH_Y_DIST),
138
+                                UBL_MESH_MIN_Y +  8 * (MESH_Y_DIST), UBL_MESH_MIN_Y +  9 * (MESH_Y_DIST),
139
+                                UBL_MESH_MIN_Y + 10 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 11 * (MESH_Y_DIST),
140
+                                UBL_MESH_MIN_Y + 12 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 13 * (MESH_Y_DIST),
141
+                                UBL_MESH_MIN_Y + 14 * (MESH_Y_DIST), UBL_MESH_MIN_Y + 15 * (MESH_Y_DIST)
142
+                              };
156 143
 
157 144
       static bool g26_debug_flag, has_control_of_lcd_panel;
158 145
 
@@ -163,11 +150,6 @@
163 150
 
164 151
       unified_bed_leveling();
165 152
 
166
-//
167
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
168
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
169
-// functions that call STATIC functions.
170
-//
171 153
       FORCE_INLINE void set_z(const int8_t px, const int8_t py, const float &z) { z_values[px][py] = z; }
172 154
         int8_t get_cell_index_x(const float &x) {
173 155
         const int8_t cx = (x - (UBL_MESH_MIN_X)) * (1.0 / (MESH_X_DIST));
@@ -184,11 +166,6 @@
184 166
                                                             // that is OK because something else should be keeping that from
185 167
                                                             // happening and should not be worried about at this level.
186 168
 
187
-//
188
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
189
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
190
-// functions that call STATIC functions.
191
-//
192 169
       int8_t find_closest_x_index(const float &x) {
193 170
         const int8_t px = (x - (UBL_MESH_MIN_X) + (MESH_X_DIST) * 0.5) * (1.0 / (MESH_X_DIST));
194 171
         return WITHIN(px, 0, GRID_MAX_POINTS_X - 1) ? px : -1;
@@ -217,11 +194,6 @@
217 194
       FORCE_INLINE float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
218 195
         return z1 + (z2 - z1) * (a0 - a1) / (a2 - a1);
219 196
       }
220
-//
221
-// Please do not put STATIC qualifiers in front of ANYTHING in this file.   You WILL cause problems by doing that.
222
-// The GCC optimizer inlines static functions and this DRAMATICALLY increases the size of the stack frame of 
223
-// functions that call STATIC functions.
224
-//
225 197
 
226 198
       /**
227 199
        * z_correction_for_x_on_horizontal_mesh_line is an optimization for

+ 32
- 33
Marlin/ubl_G29.cpp View File

@@ -50,11 +50,10 @@
50 50
   extern bool code_has_value();
51 51
   extern float probe_pt(float x, float y, bool, int);
52 52
   extern bool set_probe_deployed(bool);
53
-  void smart_fill_mesh();  
53
+  void smart_fill_mesh();
54 54
 
55 55
   bool ProbeStay = true;
56 56
 
57
-
58 57
   #define SIZE_OF_LITTLE_RAISE 0
59 58
   #define BIG_RAISE_NOT_NEEDED 0
60 59
   extern void lcd_quick_feedback();
@@ -189,13 +188,13 @@
189 188
    *   P3    Phase 3    Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths the
190 189
    *                    user can go down.  If the user specifies the value using the C parameter, the closest invalid
191 190
    *                    mesh points to the nozzle will be filled.   The user can specify a repeat count using the R
192
-   *                    parameter with the C version of the command. 
191
+   *                    parameter with the C version of the command.
193 192
    *
194
-   *                    A second version of the fill command is available if no C constant is specified.  Not 
193
+   *                    A second version of the fill command is available if no C constant is specified.  Not
195 194
    *                    specifying a C constant will invoke the 'Smart Fill' algorithm.  The G29 P3 command will search
196 195
    *                    from the edges of the mesh inward looking for invalid mesh points.  It will look at the next
197 196
    *                    several mesh points to determine if the print bed is sloped up or down.  If the bed is sloped
198
-   *                    upward from the invalid mesh point, it will be replaced with the value of the nearest mesh point. 
197
+   *                    upward from the invalid mesh point, it will be replaced with the value of the nearest mesh point.
199 198
    *                    If the bed is sloped downward from the invalid mesh point, it will be replaced with a value that
200 199
    *                    puts all three points in a line.   The second version of the G29 P3 command is a quick, easy and
201 200
    *                    usually safe way to populate the unprobed regions of your mesh so you can continue to the G26
@@ -336,7 +335,7 @@
336 335
       repetition_cnt = code_has_value() ? code_value_int() : 1;
337 336
       while (repetition_cnt--) {
338 337
         if (cnt > 20) { cnt = 0; idle(); }
339
-        const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, x_pos, y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false); 
338
+        const mesh_index_pair location = find_closest_mesh_point_of_type(REAL, x_pos, y_pos, USE_NOZZLE_AS_REFERENCE, NULL, false);
340 339
         if (location.x_index < 0) {
341 340
           SERIAL_PROTOCOLLNPGM("Entire Mesh invalidated.\n");
342 341
           break;            // No more invalid Mesh Points to populate
@@ -461,7 +460,7 @@
461 460
 
462 461
         case 3: {
463 462
           //
464
-          // Populate invalid Mesh areas.  Two choices are available to the user.  The user can 
463
+          // Populate invalid Mesh areas.  Two choices are available to the user.  The user can
465 464
           // specify the constant to be used with a C # paramter.   Or the user can allow the G29 P3 command to
466 465
           // apply a 'reasonable' constant to the invalid mesh point.  Some caution and scrutiny should be used
467 466
           // on either of these paths!
@@ -812,9 +811,9 @@
812 811
      * Z is negative, we need to invert the sign of all components of the vector
813 812
      */
814 813
     if ( normal.z < 0.0 ) {
815
-      normal.x = -normal.x; 
816
-      normal.y = -normal.y; 
817
-      normal.z = -normal.z; 
814
+      normal.x = -normal.x;
815
+      normal.y = -normal.y;
816
+      normal.z = -normal.z;
818 817
     }
819 818
 
820 819
     rotation = matrix_3x3::create_look_at( vector_3( normal.x,  normal.y, 1));
@@ -864,7 +863,7 @@
864 863
     for (i = 0; i < GRID_MAX_POINTS_X; i++) {
865 864
       for (j = 0; j < GRID_MAX_POINTS_Y; j++) {
866 865
         float x_tmp, y_tmp, z_tmp;
867
-          x_tmp = pgm_read_float(ubl.mesh_index_to_xpos[i]); 
866
+          x_tmp = pgm_read_float(ubl.mesh_index_to_xpos[i]);
868 867
           y_tmp = pgm_read_float(ubl.mesh_index_to_ypos[j]);
869 868
           z_tmp = ubl.z_values[i][j];
870 869
           #if ENABLED(DEBUG_LEVELING_FEATURE)
@@ -948,7 +947,7 @@
948 947
     float last_x = -9999.99, last_y = -9999.99;
949 948
     mesh_index_pair location;
950 949
     do {
951
-      location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_NOZZLE_AS_REFERENCE, NULL, false); 
950
+      location = find_closest_mesh_point_of_type(INVALID, lx, ly, USE_NOZZLE_AS_REFERENCE, NULL, false);
952 951
       // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
953 952
       if (location.x_index < 0 && location.y_index < 0) continue;
954 953
 
@@ -1416,7 +1415,7 @@
1416 1415
     do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
1417 1416
     do_blocking_move_to_xy(lx, ly);
1418 1417
     do {
1419
-      location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, USE_NOZZLE_AS_REFERENCE, not_done, false); 
1418
+      location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, USE_NOZZLE_AS_REFERENCE, not_done, false);
1420 1419
                                                                                               // It doesn't matter if the probe can not reach this
1421 1420
                                                                                               // location. This is a manual edit of the Mesh Point.
1422 1421
       if (location.x_index < 0 && location.y_index < 0) continue; // abort if we can't find any more points.
@@ -1501,7 +1500,7 @@
1501 1500
   }
1502 1501
 
1503 1502
   //
1504
-  // The routine provides the 'Smart Fill' capability.  It scans from the 
1503
+  // The routine provides the 'Smart Fill' capability.  It scans from the
1505 1504
   // outward edges of the mesh towards the center.  If it finds an invalid
1506 1505
   // location, it uses the next two points (assumming they are valid) to
1507 1506
   // calculate a 'reasonable' value for the unprobed mesh point.
@@ -1511,14 +1510,14 @@
1511 1510
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {             // Bottom of the mesh looking up
1512 1511
       for (uint8_t y = 0; y < GRID_MAX_POINTS_Y-2; y++) {
1513 1512
         if (isnan(ubl.z_values[x][y])) {
1514
-          if (isnan(ubl.z_values[x][y+1]))                        // we only deal with the first NAN next to a block of 
1513
+          if (isnan(ubl.z_values[x][y+1]))                        // we only deal with the first NAN next to a block of
1515 1514
             continue;                                             // good numbers.  we want 2 good numbers to extrapolate off of.
1516
-          if (isnan(ubl.z_values[x][y+2]))  
1517
-            continue;                      
1515
+          if (isnan(ubl.z_values[x][y+2]))
1516
+            continue;
1518 1517
           if (ubl.z_values[x][y+1] < ubl.z_values[x][y+2])        // The bed is angled down near this edge. So to be safe, we
1519 1518
             ubl.z_values[x][y] = ubl.z_values[x][y+1];            // use the closest value, which is probably a little too high
1520 1519
           else {
1521
-            diff = ubl.z_values[x][y+1] - ubl.z_values[x][y+2];   // The bed is angled up near this edge. So we will use the closest 
1520
+            diff = ubl.z_values[x][y+1] - ubl.z_values[x][y+2];   // The bed is angled up near this edge. So we will use the closest
1522 1521
             ubl.z_values[x][y] = ubl.z_values[x][y+1] + diff;     // height and add in the difference between that and the next point
1523 1522
           }
1524 1523
           break;
@@ -1528,14 +1527,14 @@
1528 1527
     for (uint8_t x = 0; x < GRID_MAX_POINTS_X; x++) {             // Top of the mesh looking down
1529 1528
       for (uint8_t y=GRID_MAX_POINTS_Y-1; y>=1; y--) {
1530 1529
         if (isnan(ubl.z_values[x][y])) {
1531
-          if (isnan(ubl.z_values[x][y-1]))                        // we only deal with the first NAN next to a block of 
1530
+          if (isnan(ubl.z_values[x][y-1]))                        // we only deal with the first NAN next to a block of
1532 1531
             continue;                                             // good numbers.  we want 2 good numbers to extrapolate off of.
1533
-          if (isnan(ubl.z_values[x][y-2]))  
1534
-            continue;                      
1532
+          if (isnan(ubl.z_values[x][y-2]))
1533
+            continue;
1535 1534
           if (ubl.z_values[x][y-1] < ubl.z_values[x][y-2])        // The bed is angled down near this edge. So to be safe, we
1536 1535
             ubl.z_values[x][y] = ubl.z_values[x][y-1];            // use the closest value, which is probably a little too high
1537 1536
           else {
1538
-            diff = ubl.z_values[x][y-1] - ubl.z_values[x][y-2];   // The bed is angled up near this edge. So we will use the closest 
1537
+            diff = ubl.z_values[x][y-1] - ubl.z_values[x][y-2];   // The bed is angled up near this edge. So we will use the closest
1539 1538
             ubl.z_values[x][y] = ubl.z_values[x][y-1] + diff;     // height and add in the difference between that and the next point
1540 1539
           }
1541 1540
           break;
@@ -1545,14 +1544,14 @@
1545 1544
     for (uint8_t y = 0; y < GRID_MAX_POINTS_Y; y++) {
1546 1545
       for (uint8_t x = 0; x < GRID_MAX_POINTS_X-2; x++) {         // Left side of the mesh looking right
1547 1546
         if (isnan(ubl.z_values[x][y])) {
1548
-          if (isnan(ubl.z_values[x+1][y]))                        // we only deal with the first NAN next to a block of 
1547
+          if (isnan(ubl.z_values[x+1][y]))                        // we only deal with the first NAN next to a block of
1549 1548
             continue;                                             // good numbers.  we want 2 good numbers to extrapolate off of.
1550
-          if (isnan(ubl.z_values[x+2][y]))  
1551
-            continue;                      
1549
+          if (isnan(ubl.z_values[x+2][y]))
1550
+            continue;
1552 1551
           if (ubl.z_values[x+1][y] < ubl.z_values[x+2][y])        // The bed is angled down near this edge. So to be safe, we
1553 1552
             ubl.z_values[x][y] = ubl.z_values[x][y+1];            // use the closest value, which is probably a little too high
1554 1553
           else {
1555
-            diff = ubl.z_values[x+1][y] - ubl.z_values[x+2][y];   // The bed is angled up near this edge. So we will use the closest 
1554
+            diff = ubl.z_values[x+1][y] - ubl.z_values[x+2][y];   // The bed is angled up near this edge. So we will use the closest
1556 1555
             ubl.z_values[x][y] = ubl.z_values[x+1][y] + diff;     // height and add in the difference between that and the next point
1557 1556
           }
1558 1557
           break;
@@ -1562,18 +1561,18 @@
1562 1561
     for (uint8_t y=0; y < GRID_MAX_POINTS_Y; y++) {
1563 1562
       for (uint8_t x=GRID_MAX_POINTS_X-1; x>=1; x--) {            // Right side of the mesh looking left
1564 1563
         if (isnan(ubl.z_values[x][y])) {
1565
-          if (isnan(ubl.z_values[x-1][y]))                        // we only deal with the first NAN next to a block of 
1564
+          if (isnan(ubl.z_values[x-1][y]))                        // we only deal with the first NAN next to a block of
1566 1565
             continue;                                             // good numbers.  we want 2 good numbers to extrapolate off of.
1567
-          if (isnan(ubl.z_values[x-2][y]))  
1568
-            continue;                      
1566
+          if (isnan(ubl.z_values[x-2][y]))
1567
+            continue;
1569 1568
           if (ubl.z_values[x-1][y] < ubl.z_values[x-2][y])        // The bed is angled down near this edge. So to be safe, we
1570 1569
             ubl.z_values[x][y] = ubl.z_values[x-1][y];            // use the closest value, which is probably a little too high
1571 1570
           else {
1572
-            diff = ubl.z_values[x-1][y] - ubl.z_values[x-2][y];   // The bed is angled up near this edge. So we will use the closest 
1571
+            diff = ubl.z_values[x-1][y] - ubl.z_values[x-2][y];   // The bed is angled up near this edge. So we will use the closest
1573 1572
             ubl.z_values[x][y] = ubl.z_values[x-1][y] + diff;     // height and add in the difference between that and the next point
1574 1573
           }
1575 1574
           break;
1576
-        } 
1575
+        }
1577 1576
       }
1578 1577
     }
1579 1578
   }
@@ -1600,7 +1599,7 @@
1600 1599
     for(ix=0; ix<grid_size; ix++) {
1601 1600
       x = ((float)x_min) + ix*dx;
1602 1601
       for(iy=0; iy<grid_size; iy++) {
1603
-        if (zig_zag) 
1602
+        if (zig_zag)
1604 1603
           y = ((float)y_min) + (grid_size-iy-1)*dy;
1605 1604
         else
1606 1605
           y = ((float)y_min) + iy*dy;
@@ -1666,7 +1665,7 @@
1666 1665
     for (i = 0; i < GRID_MAX_POINTS_X; i++) {
1667 1666
       for (j = 0; j < GRID_MAX_POINTS_Y; j++) {
1668 1667
         float x_tmp, y_tmp, z_tmp;
1669
-          x_tmp = pgm_read_float(&(ubl.mesh_index_to_xpos[i])); 
1668
+          x_tmp = pgm_read_float(&(ubl.mesh_index_to_xpos[i]));
1670 1669
           y_tmp = pgm_read_float(&(ubl.mesh_index_to_ypos[j]));
1671 1670
           z_tmp = ubl.z_values[i][j];
1672 1671
           #if ENABLED(DEBUG_LEVELING_FEATURE)

+ 23
- 6
Marlin/ultralcd.cpp View File

@@ -34,10 +34,6 @@
34 34
   #include "buzzer.h"
35 35
 #endif
36 36
 
37
-#if ENABLED(BLTOUCH)
38
-  #include "endstops.h"
39
-#endif
40
-
41 37
 #if ENABLED(PRINTCOUNTER)
42 38
   #include "printcounter.h"
43 39
   #include "duration_t.h"
@@ -723,6 +719,28 @@ void kill_screen(const char* lcd_msg) {
723 719
 
724 720
   #endif // MENU_ITEM_CASE_LIGHT
725 721
 
722
+  #if ENABLED(BLTOUCH)
723
+
724
+    /**
725
+     *
726
+     * "BLTouch" submenu
727
+     *
728
+     */
729
+    static void bltouch_menu() {
730
+      START_MENU();
731
+      //
732
+      // ^ Main
733
+      //
734
+      MENU_BACK(MSG_MAIN);
735
+      MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
736
+      MENU_ITEM(gcode, MSG_BLTOUCH_SELFTEST, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_SELFTEST)));
737
+      MENU_ITEM(gcode, MSG_BLTOUCH_DEPLOY, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_DEPLOY)));
738
+      MENU_ITEM(gcode, MSG_BLTOUCH_STOW, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_STOW)));
739
+      END_MENU();
740
+    }
741
+
742
+  #endif // BLTOUCH
743
+
726 744
   #if ENABLED(LCD_PROGRESS_BAR_TEST)
727 745
 
728 746
     static void progress_bar_test() {
@@ -792,8 +810,7 @@ void kill_screen(const char* lcd_msg) {
792 810
     #endif
793 811
 
794 812
     #if ENABLED(BLTOUCH)
795
-      if (!endstops.z_probe_enabled && TEST_BLTOUCH())
796
-        MENU_ITEM(gcode, MSG_BLTOUCH_RESET, PSTR("M280 P" STRINGIFY(Z_ENDSTOP_SERVO_NR) " S" STRINGIFY(BLTOUCH_RESET)));
813
+      MENU_ITEM(submenu, MSG_BLTOUCH, bltouch_menu);
797 814
     #endif
798 815
 
799 816
     if (planner.movesplanned() || IS_SD_PRINTING) {

+ 1
- 1
Marlin/ultralcd_impl_HD44780.h View File

@@ -533,7 +533,7 @@ void lcd_print(char c) { charset_mapper(c); }
533 533
     lcd.clear();
534 534
 
535 535
     safe_delay(100);
536
-    
536
+
537 537
     lcd_set_custom_characters(
538 538
       #if ENABLED(LCD_PROGRESS_BAR)
539 539
         false

+ 1
- 1
Marlin/utility.cpp View File

@@ -31,7 +31,7 @@ void safe_delay(millis_t ms) {
31 31
     thermalManager.manage_heater();
32 32
   }
33 33
   delay(ms);
34
-  thermalManager.manage_heater();	// This keeps us safe if too many small safe_delay() calls are made
34
+  thermalManager.manage_heater(); // This keeps us safe if too many small safe_delay() calls are made
35 35
 }
36 36
 
37 37
 #if ENABLED(ULTRA_LCD)

Loading…
Cancel
Save