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,8 +1339,8 @@ void MarlinSettings::reset() {
1339 1339
         SERIAL_ECHOLNPGM("UBL_MESH_MAX_X     " STRINGIFY(UBL_MESH_MAX_X));
1340 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 1344
         SERIAL_EOL;
1345 1345
       }
1346 1346
 

+ 9
- 4
Marlin/ubl_G29.cpp View File

@@ -47,6 +47,7 @@
47 47
   extern float meshedit_done;
48 48
   extern long babysteps_done;
49 49
   extern float code_value_float();
50
+  extern uint8_t code_value_byte();
50 51
   extern bool code_value_bool();
51 52
   extern bool code_has_value();
52 53
   extern float probe_pt(float x, float y, bool, int);
@@ -920,8 +921,6 @@
920 921
     float last_x = -9999.99, last_y = -9999.99;
921 922
     mesh_index_pair location;
922 923
     do {
923
-      if (do_ubl_mesh_map) ubl.display_map(map_type);
924
-
925 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 925
       // It doesn't matter if the probe can't reach the NAN location. This is a manual probe.
927 926
       if (location.x_index < 0 && location.y_index < 0) continue;
@@ -955,6 +954,8 @@
955 954
       KEEPALIVE_STATE(PAUSED_FOR_USER);
956 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 959
       while (!ubl_lcd_clicked()) {     // we need the loop to move the nozzle based on the encoder wheel here!
959 960
         idle();
960 961
         if (ubl.encoder_diff) {
@@ -1364,6 +1365,10 @@
1364 1365
   }
1365 1366
 
1366 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 1372
     mesh_index_pair location;
1368 1373
     uint16_t not_done[16];
1369 1374
     int32_t round_off;
@@ -1376,8 +1381,6 @@
1376 1381
     do_blocking_move_to_z(Z_CLEARANCE_DEPLOY_PROBE);
1377 1382
     do_blocking_move_to_xy(lx, ly);
1378 1383
     do {
1379
-      if (do_ubl_mesh_map) ubl.display_map(map_type);
1380
-
1381 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 1385
                                                                                               // It doesn't matter if the probe can not reach this
1383 1386
                                                                                               // location. This is a manual edit of the Mesh Point.
@@ -1408,6 +1411,8 @@
1408 1411
       KEEPALIVE_STATE(PAUSED_FOR_USER);
1409 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 1416
       lcd_implementation_clear();
1412 1417
       lcd_mesh_edit_setup(new_z);
1413 1418
 

+ 2
- 2
Marlin/ultralcd.cpp View File

@@ -915,12 +915,12 @@ void kill_screen(const char* lcd_msg) {
915 915
     }
916 916
 
917 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 921
     float lcd_mesh_edit() {
922 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 924
       return mesh_edit_value;
925 925
     }
926 926
 

Loading…
Cancel
Save