Browse Source

minor improvements

Configuration_store.cpp - changed a couple of print statements so the
values were printed.  The old method resulted in the formula being
printed.

ubl_G29
1) added support for R option to P4.  Now probes all points unless R is
present and the number is greater than 0.

2) P2 - moved map print statement so it showed the point that was
currently being probed,  The old location did this only for the first
point.

3) P4 - Moved the map print for the same reason.

ultralcd.cpp - changed "Mesh Editor :" to "Mesh Editor" because the LCD
draw routine puts a ":" in automatically so you end up with an extra ":"
using the old message.
Bob-the-Kuhn 8 years ago
parent
commit
60471b7592
3 changed files with 13 additions and 8 deletions
  1. 2
    2
      Marlin/configuration_store.cpp
  2. 9
    4
      Marlin/ubl_G29.cpp
  3. 2
    2
      Marlin/ultralcd.cpp

+ 2
- 2
Marlin/configuration_store.cpp View File

1339
         SERIAL_ECHOLNPGM("UBL_MESH_MAX_X     " STRINGIFY(UBL_MESH_MAX_X));
1339
         SERIAL_ECHOLNPGM("UBL_MESH_MAX_X     " STRINGIFY(UBL_MESH_MAX_X));
1340
         SERIAL_ECHOLNPGM("UBL_MESH_MAX_Y     " STRINGIFY(UBL_MESH_MAX_Y));
1340
         SERIAL_ECHOLNPGM("UBL_MESH_MAX_Y     " STRINGIFY(UBL_MESH_MAX_Y));
1341
 
1341
 
1342
-        SERIAL_ECHOLNPGM("MESH_X_DIST        " STRINGIFY(MESH_X_DIST));
1343
-        SERIAL_ECHOLNPGM("MESH_Y_DIST        " STRINGIFY(MESH_Y_DIST));
1342
+        SERIAL_ECHOLNPAIR("MESH_X_DIST        ", MESH_X_DIST);
1343
+        SERIAL_ECHOLNPAIR("MESH_Y_DIST        ", MESH_Y_DIST);
1344
         SERIAL_EOL;
1344
         SERIAL_EOL;
1345
       }
1345
       }
1346
 
1346
 

+ 9
- 4
Marlin/ubl_G29.cpp View File

47
   extern float meshedit_done;
47
   extern float meshedit_done;
48
   extern long babysteps_done;
48
   extern long babysteps_done;
49
   extern float code_value_float();
49
   extern float code_value_float();
50
+  extern uint8_t code_value_byte();
50
   extern bool code_value_bool();
51
   extern bool code_value_bool();
51
   extern bool code_has_value();
52
   extern bool code_has_value();
52
   extern float probe_pt(float x, float y, bool, int);
53
   extern float probe_pt(float x, float y, bool, int);
920
     float last_x = -9999.99, last_y = -9999.99;
921
     float last_x = -9999.99, last_y = -9999.99;
921
     mesh_index_pair location;
922
     mesh_index_pair location;
922
     do {
923
     do {
923
-      if (do_ubl_mesh_map) ubl.display_map(map_type);
924
-
925
       location = find_closest_mesh_point_of_type(INVALID, lx, ly, 0, NULL, false); // The '0' says we want to use the nozzle's position
924
       location = find_closest_mesh_point_of_type(INVALID, lx, ly, 0, NULL, false); // The '0' says we want to use the nozzle's position
926
       // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
925
       // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
927
       if (location.x_index < 0 && location.y_index < 0) continue;
926
       if (location.x_index < 0 && location.y_index < 0) continue;
955
       KEEPALIVE_STATE(PAUSED_FOR_USER);
954
       KEEPALIVE_STATE(PAUSED_FOR_USER);
956
       ubl.has_control_of_lcd_panel = true;
955
       ubl.has_control_of_lcd_panel = true;
957
 
956
 
957
+      if (do_ubl_mesh_map) ubl.display_map(map_type);  // show user where we're probing
958
+
958
       while (!ubl_lcd_clicked()) {     // we need the loop to move the nozzle based on the encoder wheel here!
959
       while (!ubl_lcd_clicked()) {     // we need the loop to move the nozzle based on the encoder wheel here!
959
         idle();
960
         idle();
960
         if (ubl.encoder_diff) {
961
         if (ubl.encoder_diff) {
1364
   }
1365
   }
1365
 
1366
 
1366
   void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) {
1367
   void fine_tune_mesh(const float &lx, const float &ly, const bool do_ubl_mesh_map) {
1368
+    // do all mesh points unless R option has a value of 1 or more
1369
+    repetition_cnt = code_seen('R') && code_has_value() ? code_value_byte() : GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y;
1370
+    if (repetition_cnt == 0) repetition_cnt = GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y;
1371
+
1367
     mesh_index_pair location;
1372
     mesh_index_pair location;
1368
     uint16_t not_done[16];
1373
     uint16_t not_done[16];
1369
     int32_t round_off;
1374
     int32_t round_off;
1376
     do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
1381
     do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
1377
     do_blocking_move_to_xy(lx, ly);
1382
     do_blocking_move_to_xy(lx, ly);
1378
     do {
1383
     do {
1379
-      if (do_ubl_mesh_map) ubl.display_map(map_type);
1380
-
1381
       location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, 0, not_done, false); // The '0' says we want to use the nozzle's position
1384
       location = find_closest_mesh_point_of_type(SET_IN_BITMAP, lx, ly, 0, not_done, false); // The '0' says we want to use the nozzle's position
1382
                                                                                               // It doesn't matter if the probe can not reach this
1385
                                                                                               // It doesn't matter if the probe can not reach this
1383
                                                                                               // location. This is a manual edit of the Mesh Point.
1386
                                                                                               // location. This is a manual edit of the Mesh Point.
1408
       KEEPALIVE_STATE(PAUSED_FOR_USER);
1411
       KEEPALIVE_STATE(PAUSED_FOR_USER);
1409
       ubl.has_control_of_lcd_panel = true;
1412
       ubl.has_control_of_lcd_panel = true;
1410
 
1413
 
1414
+      if (do_ubl_mesh_map) ubl.display_map(map_type);  // show the user which point is being adjusted
1415
+
1411
       lcd_implementation_clear();
1416
       lcd_implementation_clear();
1412
       lcd_mesh_edit_setup(new_z);
1417
       lcd_mesh_edit_setup(new_z);
1413
 
1418
 

+ 2
- 2
Marlin/ultralcd.cpp View File

915
     }
915
     }
916
 
916
 
917
     void _lcd_mesh_edit() {
917
     void _lcd_mesh_edit() {
918
-      _lcd_mesh_fine_tune(PSTR("Mesh Editor: "));
918
+      _lcd_mesh_fine_tune(PSTR("Mesh Editor"));
919
     }
919
     }
920
 
920
 
921
     float lcd_mesh_edit() {
921
     float lcd_mesh_edit() {
922
       lcd_goto_screen(_lcd_mesh_edit_NOP);
922
       lcd_goto_screen(_lcd_mesh_edit_NOP);
923
-      _lcd_mesh_fine_tune(PSTR("Mesh Editor: "));
923
+      _lcd_mesh_fine_tune(PSTR("Mesh Editor"));
924
       return mesh_edit_value;
924
       return mesh_edit_value;
925
     }
925
     }
926
 
926
 

Loading…
Cancel
Save