Browse Source

Clean up excess whitespace, comment formatting

Scott Lahteine 8 years ago
parent
commit
0a8e09c723

+ 28
- 28
Marlin/Marlin_main.cpp View File

2065
       safe_delay(BLTOUCH_DELAY);
2065
       safe_delay(BLTOUCH_DELAY);
2066
     }
2066
     }
2067
 
2067
 
2068
-    // 
2068
+    //
2069
     // The BL-Touch probes have a HAL effect sensor.  The high currents switching
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
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.
2071
     // sensor.  So, for BL-Touch probes, we turn off the heaters during the actual probe.
2075
     void turn_heaters_on_or_off_for_bltouch(const bool deploy) {
2075
     void turn_heaters_on_or_off_for_bltouch(const bool deploy) {
2076
       static int8_t bltouch_recursion_cnt=0;
2076
       static int8_t bltouch_recursion_cnt=0;
2077
       static millis_t last_emi_protection=0;
2077
       static millis_t last_emi_protection=0;
2078
-      static float temps_at_entry[HOTENDS]; 
2078
+      static float temps_at_entry[HOTENDS];
2079
       #if HAS_TEMP_BED
2079
       #if HAS_TEMP_BED
2080
         static float bed_temp_at_entry;
2080
         static float bed_temp_at_entry;
2081
       #endif
2081
       #endif
2088
       if (deploy) {
2088
       if (deploy) {
2089
         bltouch_recursion_cnt++;
2089
         bltouch_recursion_cnt++;
2090
         last_emi_protection = millis();
2090
         last_emi_protection = millis();
2091
-        HOTEND_LOOP() temps_at_entry[e] = thermalManager.degTargetHotend(e);        // save the current target temperatures 
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.
2092
         HOTEND_LOOP() thermalManager.setTargetHotend(0, e);                         // so we know what to restore them to.
2093
 
2093
 
2094
         #if HAS_TEMP_BED
2094
         #if HAS_TEMP_BED
2095
           bed_temp_at_entry = thermalManager.degTargetBed();
2095
           bed_temp_at_entry = thermalManager.degTargetBed();
2096
           thermalManager.setTargetBed(0.0);
2096
           thermalManager.setTargetBed(0.0);
2097
         #endif
2097
         #endif
2098
-      } 
2098
+      }
2099
       else {
2099
       else {
2100
         bltouch_recursion_cnt--;                                                    // the heaters are only turned back on
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
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 
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
2104
             thermalManager.setTargetBed(bed_temp_at_entry);                         // 20 seconds ago
2105
           #endif
2105
           #endif
2106
         }
2106
         }
2113
         turn_heaters_on_or_off_for_bltouch(deploy);
2113
         turn_heaters_on_or_off_for_bltouch(deploy);
2114
       #endif
2114
       #endif
2115
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2115
       if (deploy && TEST_BLTOUCH()) {      // If BL-Touch says it's triggered
2116
-        bltouch_command(BLTOUCH_RESET);    // try to reset it.
2116
+        bltouch_command(BLTOUCH_RESET);    //  try to reset it.
2117
         bltouch_command(BLTOUCH_DEPLOY);   // Also needs to deploy and stow to
2117
         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
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, and stow sequence)
2122
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2122
         if (TEST_BLTOUCH()) {              // If it still claims to be triggered...
2123
           SERIAL_ERROR_START;
2123
           SERIAL_ERROR_START;
2124
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
2124
           SERIAL_ERRORLNPGM(MSG_STOP_BLTOUCH);
2328
     return current_position[Z_AXIS] + zprobe_zoffset;
2328
     return current_position[Z_AXIS] + zprobe_zoffset;
2329
   }
2329
   }
2330
 
2330
 
2331
-  //
2332
-  // - Move to the given XY
2333
-  // - Deploy the probe, if not already deployed
2334
-  // - Probe the bed, get the Z position
2335
-  // - Depending on the 'stow' flag
2336
-  //   - Stow the probe, or
2337
-  //   - Raise to the BETWEEN height
2338
-  // - Return the probed Z position
2339
-  //
2331
+  /**
2332
+   * - Move to the given XY
2333
+   * - Deploy the probe, if not already deployed
2334
+   * - Probe the bed, get the Z position
2335
+   * - Depending on the 'stow' flag
2336
+   *   - Stow the probe, or
2337
+   *   - Raise to the BETWEEN height
2338
+   * - Return the probed Z position
2339
+   */
2340
   float probe_pt(const float x, const float y, const bool stow/*=true*/, const int verbose_level/*=1*/) {
2340
   float probe_pt(const float x, const float y, const bool stow/*=true*/, const int verbose_level/*=1*/) {
2341
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2341
     #if ENABLED(DEBUG_LEVELING_FEATURE)
2342
       if (DEBUGGING(LEVELING)) {
2342
       if (DEBUGGING(LEVELING)) {
2505
 
2505
 
2506
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING)
2506
 #if ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(MESH_BED_LEVELING)
2507
 
2507
 
2508
-  //
2509
-  // Enable if you prefer your output in JSON format
2510
-  // suitable for SCAD or JavaScript mesh visualizers.
2511
-  //
2512
-  // Visualize meshes in OpenSCAD using the included script.
2513
-  //
2514
-  //   buildroot/shared/scripts/MarlinMesh.scad
2515
-  //
2508
+  /**
2509
+   * Enable to produce output in JSON format suitable
2510
+   * for SCAD or JavaScript mesh visualizers.
2511
+   *
2512
+   * Visualize meshes in OpenSCAD using the included script.
2513
+   *
2514
+   *   buildroot/shared/scripts/MarlinMesh.scad
2515
+   */
2516
   //#define SCAD_MESH_OUTPUT
2516
   //#define SCAD_MESH_OUTPUT
2517
 
2517
 
2518
   /**
2518
   /**

+ 2
- 3
Marlin/example_configurations/FolgerTech-i3-2020/Configuration.h View File

316
   #define K1 0.95 //smoothing factor within the PID
316
   #define K1 0.95 //smoothing factor within the PID
317
 
317
 
318
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
318
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
319
-  
320
-    
319
+
321
   // FolgerTech i3-2020
320
   // FolgerTech i3-2020
322
   #define  DEFAULT_Kp 11.50
321
   #define  DEFAULT_Kp 11.50
323
   #define  DEFAULT_Ki 0.50
322
   #define  DEFAULT_Ki 0.50
921
     #define UBL_MESH_INSET 1         // Mesh inset margin on print area
920
     #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.
921
     #define GRID_MAX_POINTS_X 10     // Don't use more than 15 points per axis, implementation limited.
923
     #define GRID_MAX_POINTS_Y 10
922
     #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	
923
+    #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.
924
     #define UBL_PROBE_PT_1_Y 170   // of the mesh.
926
     #define UBL_PROBE_PT_2_X 45
925
     #define UBL_PROBE_PT_2_X 45
927
     #define UBL_PROBE_PT_2_Y 25
926
     #define UBL_PROBE_PT_2_Y 25

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

133
 //#define MOTHERBOARD BOARD_RAMPS_14_EEF
133
 //#define MOTHERBOARD BOARD_RAMPS_14_EEF
134
   #define MOTHERBOARD BOARD_RAMPS_14_EFB       // gMax users please note:  This is a Roxy modification.   I print on glass and
134
   #define MOTHERBOARD BOARD_RAMPS_14_EFB       // gMax users please note:  This is a Roxy modification.   I print on glass and
135
                                                // I use Marlin to control the bed's temperature.  So, if you have a single nozzle
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
                                                // temp.
138
                                                // temp.
139
 #endif
139
 #endif
140
 
140
 
261
 #define TEMP_SENSOR_3 0
261
 #define TEMP_SENSOR_3 0
262
 #define TEMP_SENSOR_4 0
262
 #define TEMP_SENSOR_4 0
263
 #define TEMP_SENSOR_BED 75   // gMax-1.5+ users please note:   This is a Roxy modification to the printer.   I want
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
                              // to be set to 0
266
                              // to be set to 0
267
 
267
 
268
 // Dummy thermistor constant temperature readings, for use with 998 and 999
268
 // Dummy thermistor constant temperature readings, for use with 998 and 999
325
   #define K1 0.95 //smoothing factor within the PID
325
   #define K1 0.95 //smoothing factor within the PID
326
 
326
 
327
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
327
   // If you are using a pre-configured hotend then you can use one of the value sets by uncommenting it
328
-  
328
+
329
   // gMax J-Head
329
   // gMax J-Head
330
     #define  DEFAULT_Kp 15.35
330
     #define  DEFAULT_Kp 15.35
331
     #define  DEFAULT_Ki 0.85
331
     #define  DEFAULT_Ki 0.85
332
     #define  DEFAULT_Kd 69.45
332
     #define  DEFAULT_Kd 69.45
333
-    
333
+
334
   // Ultimaker
334
   // Ultimaker
335
 //  #define  DEFAULT_Kp 22.2
335
 //  #define  DEFAULT_Kp 22.2
336
 //  #define  DEFAULT_Ki 1.08
336
 //  #define  DEFAULT_Ki 1.08
793
 #define Y_MIN_POS 0
793
 #define Y_MIN_POS 0
794
 #define Z_MIN_POS 0
794
 #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
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, 
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.
797
                                 // the nozzle can reach all cordinates of the mesh.
798
 #define Z_MAX_POS 500
798
 #define Z_MAX_POS 500
799
 
799
 

+ 1
- 1
Marlin/language_tr.h View File

233
 #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE  _UxGT("Daha Akıt")                                          // Daha Akıt
233
 #define MSG_FILAMENT_CHANGE_OPTION_EXTRUDE  _UxGT("Daha Akıt")                                          // Daha Akıt
234
 #define MSG_FILAMENT_CHANGE_OPTION_RESUME   _UxGT("Baskıyı sürdür")                                     // Baskıyı sürdür
234
 #define MSG_FILAMENT_CHANGE_OPTION_RESUME   _UxGT("Baskıyı sürdür")                                     // Baskıyı sürdür
235
 #define MSG_FILAMENT_CHANGE_MINTEMP         _UxGT("Min. Sıcaklık")                                      // Min. Sıcaklık:
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
 #if LCD_HEIGHT >= 4
238
 #if LCD_HEIGHT >= 4
239
   // Up to 3 lines allowed
239
   // Up to 3 lines allowed

+ 6
- 6
Marlin/softspi.h View File

19
  */
19
  */
20
 static inline __attribute__((always_inline))
20
 static inline __attribute__((always_inline))
21
 void fastDigitalWrite(uint8_t pin, bool value) {
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
 #else  // CORE_TEENSY
28
 #else  // CORE_TEENSY
29
 //------------------------------------------------------------------------------
29
 //------------------------------------------------------------------------------
574
   /** Parenthesis operator
574
   /** Parenthesis operator
575
    * @return Pin's level
575
    * @return Pin's level
576
    */
576
    */
577
-	inline operator bool () const __attribute__((always_inline)) {
577
+  inline operator bool () const __attribute__((always_inline)) {
578
     return read();
578
     return read();
579
   }
579
   }
580
   //----------------------------------------------------------------------------
580
   //----------------------------------------------------------------------------

+ 32
- 33
Marlin/ubl_G29.cpp View File

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

+ 1
- 1
Marlin/ultralcd_impl_HD44780.h View File

533
     lcd.clear();
533
     lcd.clear();
534
 
534
 
535
     safe_delay(100);
535
     safe_delay(100);
536
-    
536
+
537
     lcd_set_custom_characters(
537
     lcd_set_custom_characters(
538
       #if ENABLED(LCD_PROGRESS_BAR)
538
       #if ENABLED(LCD_PROGRESS_BAR)
539
         false
539
         false

+ 1
- 1
Marlin/utility.cpp View File

31
     thermalManager.manage_heater();
31
     thermalManager.manage_heater();
32
   }
32
   }
33
   delay(ms);
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
 #if ENABLED(ULTRA_LCD)
37
 #if ENABLED(ULTRA_LCD)

Loading…
Cancel
Save