Pārlūkot izejas kodu

Merge pull request #1199 from ei8htohms/Marlin_v1

Change Auto_Bed_Leveling to Auto_Bed_Compensation
Bo Herrmannsen 10 gadus atpakaļ
vecāks
revīzija
1e865e5df7

+ 14
- 14
Marlin/Configuration.h Parādīt failu

340
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
340
 #define X_MAX_LENGTH (X_MAX_POS - X_MIN_POS)
341
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
341
 #define Y_MAX_LENGTH (Y_MAX_POS - Y_MIN_POS)
342
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
342
 #define Z_MAX_LENGTH (Z_MAX_POS - Z_MIN_POS)
343
-//============================= Bed Auto Leveling ===========================
343
+//============================= Bed Auto Compensation ===========================
344
 
344
 
345
-//#define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
346
-#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Leveling is Enabled.
345
+//#define ENABLE_AUTO_BED_COMPENSATION // Delete the comment to enable (remove // at the start of the line)
346
+#define Z_PROBE_REPEATABILITY_TEST  // If not commented out, Z-Probe Repeatability test will be included if Auto Bed Compensation is Enabled.
347
 
347
 
348
-#ifdef ENABLE_AUTO_BED_LEVELING
348
+#ifdef ENABLE_AUTO_BED_COMPENSATION
349
 
349
 
350
 // There are 2 different ways to pick the X and Y locations to probe:
350
 // There are 2 different ways to pick the X and Y locations to probe:
351
 
351
 
353
 //    Probe every point in a rectangular grid
353
 //    Probe every point in a rectangular grid
354
 //    You must specify the rectangle, and the density of sample points
354
 //    You must specify the rectangle, and the density of sample points
355
 //    This mode is preferred because there are more measurements.
355
 //    This mode is preferred because there are more measurements.
356
-//    It used to be called ACCURATE_BED_LEVELING but "grid" is more descriptive
356
+//    It used to be called ACCURATE_BED_COMPENSATION but "grid" is more descriptive
357
 
357
 
358
 //  - "3-point" mode
358
 //  - "3-point" mode
359
 //    Probe 3 arbitrary points on the bed (that aren't colinear)
359
 //    Probe 3 arbitrary points on the bed (that aren't colinear)
360
 //    You must specify the X & Y coordinates of all 3 points
360
 //    You must specify the X & Y coordinates of all 3 points
361
 
361
 
362
-  #define AUTO_BED_LEVELING_GRID
363
-  // with AUTO_BED_LEVELING_GRID, the bed is sampled in a
364
-  // AUTO_BED_LEVELING_GRID_POINTSxAUTO_BED_LEVELING_GRID_POINTS grid
362
+  #define AUTO_BED_COMPENSATION_GRID
363
+  // with AUTO_BED_COMPENSATION_GRID, the bed is sampled in a
364
+  // AUTO_BED_COMPENSATION_GRID_POINTSxAUTO_BED_COMPENSATION_GRID_POINTS grid
365
   // and least squares solution is calculated
365
   // and least squares solution is calculated
366
   // Note: this feature occupies 10'206 byte
366
   // Note: this feature occupies 10'206 byte
367
-  #ifdef AUTO_BED_LEVELING_GRID
367
+  #ifdef AUTO_BED_COMPENSATION_GRID
368
 
368
 
369
     // set the rectangle in which to probe
369
     // set the rectangle in which to probe
370
     #define LEFT_PROBE_BED_POSITION 15
370
     #define LEFT_PROBE_BED_POSITION 15
374
 
374
 
375
      // set the number of grid points per dimension
375
      // set the number of grid points per dimension
376
      // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
376
      // I wouldn't see a reason to go above 3 (=9 probing points on the bed)
377
-    #define AUTO_BED_LEVELING_GRID_POINTS 2
377
+    #define AUTO_BED_COMPENSATION_GRID_POINTS 2
378
 
378
 
379
 
379
 
380
-  #else  // not AUTO_BED_LEVELING_GRID
380
+  #else  // not AUTO_BED_COMPENSATION_GRID
381
     // with no grid, just probe 3 arbitrary points.  A simple cross-product
381
     // with no grid, just probe 3 arbitrary points.  A simple cross-product
382
     // is used to esimate the plane of the print bed
382
     // is used to esimate the plane of the print bed
383
 
383
 
388
       #define ABL_PROBE_PT_3_X 170
388
       #define ABL_PROBE_PT_3_X 170
389
       #define ABL_PROBE_PT_3_Y 20
389
       #define ABL_PROBE_PT_3_Y 20
390
 
390
 
391
-  #endif // AUTO_BED_LEVELING_GRID
391
+  #endif // AUTO_BED_COMPENSATION_GRID
392
 
392
 
393
 
393
 
394
   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
394
   // these are the offsets to the probe relative to the extruder tip (Hotend - Probe)
414
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
414
 //  #define PROBE_SERVO_DEACTIVATION_DELAY 300
415
 
415
 
416
 
416
 
417
-//If you have enabled the Bed Auto Leveling and are using the same Z Probe for Z Homing,
417
+//If you have enabled the Bed Auto Compensation and are using the same Z Probe for Z Homing,
418
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
418
 //it is highly recommended you let this Z_SAFE_HOMING enabled!!!
419
 
419
 
420
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
420
   #define Z_SAFE_HOMING   // This feature is meant to avoid Z homing with probe outside the bed area.
431
 
431
 
432
   #endif
432
   #endif
433
 
433
 
434
-#endif // ENABLE_AUTO_BED_LEVELING
434
+#endif // ENABLE_AUTO_BED_COMPENSATION
435
 
435
 
436
 
436
 
437
 // The position of the homing switches
437
 // The position of the homing switches

+ 1
- 1
Marlin/ConfigurationStore.cpp Parādīt failu

319
     absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
319
     absPreheatHPBTemp = ABS_PREHEAT_HPB_TEMP;
320
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
320
     absPreheatFanSpeed = ABS_PREHEAT_FAN_SPEED;
321
 #endif
321
 #endif
322
-#ifdef ENABLE_AUTO_BED_LEVELING
322
+#ifdef ENABLE_AUTO_BED_COMPENSATION
323
     zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
323
     zprobe_zoffset = -Z_PROBE_OFFSET_FROM_EXTRUDER;
324
 #endif
324
 #endif
325
 #ifdef DOGLCD
325
 #ifdef DOGLCD

+ 57
- 57
Marlin/Marlin_main.cpp Parādīt failu

29
 
29
 
30
 #include "Marlin.h"
30
 #include "Marlin.h"
31
 
31
 
32
-#ifdef ENABLE_AUTO_BED_LEVELING
32
+#ifdef ENABLE_AUTO_BED_COMPENSATION
33
 #include "vector_3.h"
33
 #include "vector_3.h"
34
-  #ifdef AUTO_BED_LEVELING_GRID
34
+  #ifdef AUTO_BED_COMPENSATION_GRID
35
     #include "qr_solve.h"
35
     #include "qr_solve.h"
36
   #endif
36
   #endif
37
-#endif // ENABLE_AUTO_BED_LEVELING
37
+#endif // ENABLE_AUTO_BED_COMPENSATION
38
 
38
 
39
 #include "ultralcd.h"
39
 #include "ultralcd.h"
40
 #include "planner.h"
40
 #include "planner.h"
520
   }
520
   }
521
   #endif
521
   #endif
522
 
522
 
523
-  #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
523
+  #if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
524
   delay(PROBE_SERVO_DEACTIVATION_DELAY);
524
   delay(PROBE_SERVO_DEACTIVATION_DELAY);
525
   servos[servo_endstops[Z_AXIS]].detach();
525
   servos[servo_endstops[Z_AXIS]].detach();
526
   #endif
526
   #endif
962
 #endif
962
 #endif
963
 }
963
 }
964
 
964
 
965
-#ifdef ENABLE_AUTO_BED_LEVELING
966
-#ifdef AUTO_BED_LEVELING_GRID
967
-static void set_bed_level_equation_lsq(double *plane_equation_coefficients)
965
+#ifdef ENABLE_AUTO_BED_COMPENSATION
966
+#ifdef AUTO_BED_COMPENSATION_GRID
967
+static void set_bed_compensation_equation_lsq(double *plane_equation_coefficients)
968
 {
968
 {
969
     vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
969
     vector_3 planeNormal = vector_3(-plane_equation_coefficients[0], -plane_equation_coefficients[1], 1);
970
     planeNormal.debug("planeNormal");
970
     planeNormal.debug("planeNormal");
971
-    plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
972
-    //bedLevel.debug("bedLevel");
971
+    plan_bed_compensation_matrix = matrix_3x3::create_look_at(planeNormal);
972
+    //bedCompensation.debug("bedCompensation");
973
 
973
 
974
-    //plan_bed_level_matrix.debug("bed level before");
974
+    //plan_bed_compensation_matrix.debug("bed compensation before");
975
     //vector_3 uncorrected_position = plan_get_position_mm();
975
     //vector_3 uncorrected_position = plan_get_position_mm();
976
     //uncorrected_position.debug("position before");
976
     //uncorrected_position.debug("position before");
977
 
977
 
987
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
987
     plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
988
 }
988
 }
989
 
989
 
990
-#else // not AUTO_BED_LEVELING_GRID
990
+#else // not AUTO_BED_COMPENSATION_GRID
991
 
991
 
992
-static void set_bed_level_equation_3pts(float z_at_pt_1, float z_at_pt_2, float z_at_pt_3) {
992
+static void set_bed_compensation_equation_3pts(float z_at_pt_1, float z_at_pt_2, float z_at_pt_3) {
993
 
993
 
994
-    plan_bed_level_matrix.set_to_identity();
994
+    plan_bed_compensation_matrix.set_to_identity();
995
 
995
 
996
     vector_3 pt1 = vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, z_at_pt_1);
996
     vector_3 pt1 = vector_3(ABL_PROBE_PT_1_X, ABL_PROBE_PT_1_Y, z_at_pt_1);
997
     vector_3 pt2 = vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, z_at_pt_2);
997
     vector_3 pt2 = vector_3(ABL_PROBE_PT_2_X, ABL_PROBE_PT_2_Y, z_at_pt_2);
1002
     vector_3 planeNormal = vector_3::cross(from_2_to_1, from_2_to_3).get_normal();
1002
     vector_3 planeNormal = vector_3::cross(from_2_to_1, from_2_to_3).get_normal();
1003
     planeNormal = vector_3(planeNormal.x, planeNormal.y, abs(planeNormal.z));
1003
     planeNormal = vector_3(planeNormal.x, planeNormal.y, abs(planeNormal.z));
1004
 
1004
 
1005
-    plan_bed_level_matrix = matrix_3x3::create_look_at(planeNormal);
1005
+    plan_bed_compensation_matrix = matrix_3x3::create_look_at(planeNormal);
1006
 
1006
 
1007
     vector_3 corrected_position = plan_get_position();
1007
     vector_3 corrected_position = plan_get_position();
1008
     current_position[X_AXIS] = corrected_position.x;
1008
     current_position[X_AXIS] = corrected_position.x;
1016
 
1016
 
1017
 }
1017
 }
1018
 
1018
 
1019
-#endif // AUTO_BED_LEVELING_GRID
1019
+#endif // AUTO_BED_COMPENSATION_GRID
1020
 
1020
 
1021
 static void run_z_probe() {
1021
 static void run_z_probe() {
1022
-    plan_bed_level_matrix.set_to_identity();
1022
+    plan_bed_compensation_matrix.set_to_identity();
1023
     feedrate = homing_feedrate[Z_AXIS];
1023
     feedrate = homing_feedrate[Z_AXIS];
1024
 
1024
 
1025
     // move down until you find the bed
1025
     // move down until you find the bed
1088
     // Engage Z Servo endstop if enabled
1088
     // Engage Z Servo endstop if enabled
1089
     #ifdef SERVO_ENDSTOPS
1089
     #ifdef SERVO_ENDSTOPS
1090
     if (servo_endstops[Z_AXIS] > -1) {
1090
     if (servo_endstops[Z_AXIS] > -1) {
1091
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1091
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1092
         servos[servo_endstops[Z_AXIS]].attach(0);
1092
         servos[servo_endstops[Z_AXIS]].attach(0);
1093
 #endif
1093
 #endif
1094
         servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]);
1094
         servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2]);
1095
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1095
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1096
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1096
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1097
         servos[servo_endstops[Z_AXIS]].detach();
1097
         servos[servo_endstops[Z_AXIS]].detach();
1098
 #endif
1098
 #endif
1104
     // Retract Z Servo endstop if enabled
1104
     // Retract Z Servo endstop if enabled
1105
     #ifdef SERVO_ENDSTOPS
1105
     #ifdef SERVO_ENDSTOPS
1106
     if (servo_endstops[Z_AXIS] > -1) {
1106
     if (servo_endstops[Z_AXIS] > -1) {
1107
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1107
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1108
         servos[servo_endstops[Z_AXIS]].attach(0);
1108
         servos[servo_endstops[Z_AXIS]].attach(0);
1109
 #endif
1109
 #endif
1110
         servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
1110
         servos[servo_endstops[Z_AXIS]].write(servo_endstop_angles[Z_AXIS * 2 + 1]);
1111
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1111
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1112
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1112
         delay(PROBE_SERVO_DEACTIVATION_DELAY);
1113
         servos[servo_endstops[Z_AXIS]].detach();
1113
         servos[servo_endstops[Z_AXIS]].detach();
1114
 #endif
1114
 #endif
1142
   return measured_z;
1142
   return measured_z;
1143
 }
1143
 }
1144
 
1144
 
1145
-#endif // #ifdef ENABLE_AUTO_BED_LEVELING
1145
+#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
1146
 
1146
 
1147
 static void homeaxis(int axis) {
1147
 static void homeaxis(int axis) {
1148
 #define HOMEAXIS_DO(LETTER) \
1148
 #define HOMEAXIS_DO(LETTER) \
1165
 #ifndef Z_PROBE_SLED
1165
 #ifndef Z_PROBE_SLED
1166
     // Engage Servo endstop if enabled
1166
     // Engage Servo endstop if enabled
1167
     #ifdef SERVO_ENDSTOPS
1167
     #ifdef SERVO_ENDSTOPS
1168
-      #if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1168
+      #if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1169
         if (axis==Z_AXIS) {
1169
         if (axis==Z_AXIS) {
1170
           engage_z_probe();
1170
           engage_z_probe();
1171
         }
1171
         }
1216
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
1216
         servos[servo_endstops[axis]].write(servo_endstop_angles[axis * 2 + 1]);
1217
       }
1217
       }
1218
     #endif
1218
     #endif
1219
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1219
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
1220
   #ifndef Z_PROBE_SLED
1220
   #ifndef Z_PROBE_SLED
1221
     if (axis==Z_AXIS) retract_z_probe();
1221
     if (axis==Z_AXIS) retract_z_probe();
1222
   #endif
1222
   #endif
1325
 {
1325
 {
1326
   unsigned long codenum; //throw away variable
1326
   unsigned long codenum; //throw away variable
1327
   char *starpos = NULL;
1327
   char *starpos = NULL;
1328
-#ifdef ENABLE_AUTO_BED_LEVELING
1328
+#ifdef ENABLE_AUTO_BED_COMPENSATION
1329
   float x_tmp, y_tmp, z_tmp, real_z;
1329
   float x_tmp, y_tmp, z_tmp, real_z;
1330
 #endif
1330
 #endif
1331
   if(code_seen('G'))
1331
   if(code_seen('G'))
1399
       break;
1399
       break;
1400
       #endif //FWRETRACT
1400
       #endif //FWRETRACT
1401
     case 28: //G28 Home all Axis one at a time
1401
     case 28: //G28 Home all Axis one at a time
1402
-#ifdef ENABLE_AUTO_BED_LEVELING
1403
-      plan_bed_level_matrix.set_to_identity();  //Reset the plane ("erase" all leveling data)
1404
-#endif //ENABLE_AUTO_BED_LEVELING
1402
+#ifdef ENABLE_AUTO_BED_COMPENSATION
1403
+      plan_bed_compensation_matrix.set_to_identity();  //Reset the plane ("erase" all compensation data)
1404
+#endif //ENABLE_AUTO_BED_COMPENSATION
1405
 
1405
 
1406
       saved_feedrate = feedrate;
1406
       saved_feedrate = feedrate;
1407
       saved_feedmultiply = feedmultiply;
1407
       saved_feedmultiply = feedmultiply;
1605
           current_position[Z_AXIS]=code_value()+add_homing[Z_AXIS];
1605
           current_position[Z_AXIS]=code_value()+add_homing[Z_AXIS];
1606
         }
1606
         }
1607
       }
1607
       }
1608
-      #ifdef ENABLE_AUTO_BED_LEVELING
1608
+      #ifdef ENABLE_AUTO_BED_COMPENSATION
1609
         if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1609
         if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
1610
           current_position[Z_AXIS] += zprobe_zoffset;  //Add Z_Probe offset (the distance is negative)
1610
           current_position[Z_AXIS] += zprobe_zoffset;  //Add Z_Probe offset (the distance is negative)
1611
         }
1611
         }
1628
       endstops_hit_on_purpose();
1628
       endstops_hit_on_purpose();
1629
       break;
1629
       break;
1630
 
1630
 
1631
-#ifdef ENABLE_AUTO_BED_LEVELING
1631
+#ifdef ENABLE_AUTO_BED_COMPENSATION
1632
     case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
1632
     case 29: // G29 Detailed Z-Probe, probes the bed at 3 or more points.
1633
         {
1633
         {
1634
             #if Z_MIN_PIN == -1
1634
             #if Z_MIN_PIN == -1
1635
-            #error "You must have a Z_MIN endstop in order to enable Auto Bed Leveling feature!!! Z_MIN_PIN must point to a valid hardware pin."
1635
+            #error "You must have a Z_MIN endstop in order to enable Auto Bed Compensation feature!!! Z_MIN_PIN must point to a valid hardware pin."
1636
             #endif
1636
             #endif
1637
 
1637
 
1638
             // Prevent user from running a G29 without first homing in X and Y
1638
             // Prevent user from running a G29 without first homing in X and Y
1648
             dock_sled(false);
1648
             dock_sled(false);
1649
 #endif // Z_PROBE_SLED
1649
 #endif // Z_PROBE_SLED
1650
             st_synchronize();
1650
             st_synchronize();
1651
-            // make sure the bed_level_rotation_matrix is identity or the planner will get it incorectly
1651
+            // make sure the bed_compensation_rotation_matrix is identity or the planner will get it incorectly
1652
             //vector_3 corrected_position = plan_get_position_mm();
1652
             //vector_3 corrected_position = plan_get_position_mm();
1653
             //corrected_position.debug("position before G29");
1653
             //corrected_position.debug("position before G29");
1654
-            plan_bed_level_matrix.set_to_identity();
1654
+            plan_bed_compensation_matrix.set_to_identity();
1655
             vector_3 uncorrected_position = plan_get_position();
1655
             vector_3 uncorrected_position = plan_get_position();
1656
             //uncorrected_position.debug("position durring G29");
1656
             //uncorrected_position.debug("position durring G29");
1657
             current_position[X_AXIS] = uncorrected_position.x;
1657
             current_position[X_AXIS] = uncorrected_position.x;
1661
             setup_for_endstop_move();
1661
             setup_for_endstop_move();
1662
 
1662
 
1663
             feedrate = homing_feedrate[Z_AXIS];
1663
             feedrate = homing_feedrate[Z_AXIS];
1664
-#ifdef AUTO_BED_LEVELING_GRID
1664
+#ifdef AUTO_BED_COMPENSATION_GRID
1665
             // probe at the points of a lattice grid
1665
             // probe at the points of a lattice grid
1666
 
1666
 
1667
-            int xGridSpacing = (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (AUTO_BED_LEVELING_GRID_POINTS-1);
1668
-            int yGridSpacing = (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (AUTO_BED_LEVELING_GRID_POINTS-1);
1667
+            int xGridSpacing = (RIGHT_PROBE_BED_POSITION - LEFT_PROBE_BED_POSITION) / (AUTO_BED_COMPENSATION_GRID_POINTS-1);
1668
+            int yGridSpacing = (BACK_PROBE_BED_POSITION - FRONT_PROBE_BED_POSITION) / (AUTO_BED_COMPENSATION_GRID_POINTS-1);
1669
 
1669
 
1670
 
1670
 
1671
             // solve the plane equation ax + by + d = z
1671
             // solve the plane equation ax + by + d = z
1675
             // so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z
1675
             // so Vx = -a Vy = -b Vz = 1 (we want the vector facing towards positive Z
1676
 
1676
 
1677
             // "A" matrix of the linear system of equations
1677
             // "A" matrix of the linear system of equations
1678
-            double eqnAMatrix[AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS*3];
1678
+            double eqnAMatrix[AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS*3];
1679
             // "B" vector of Z points
1679
             // "B" vector of Z points
1680
-            double eqnBVector[AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS];
1680
+            double eqnBVector[AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS];
1681
 
1681
 
1682
 
1682
 
1683
             int probePointCounter = 0;
1683
             int probePointCounter = 0;
1700
                 zig = true;
1700
                 zig = true;
1701
               }
1701
               }
1702
 
1702
 
1703
-              for (int xCount=0; xCount < AUTO_BED_LEVELING_GRID_POINTS; xCount++)
1703
+              for (int xCount=0; xCount < AUTO_BED_COMPENSATION_GRID_POINTS; xCount++)
1704
               {
1704
               {
1705
                 float z_before;
1705
                 float z_before;
1706
                 if (probePointCounter == 0)
1706
                 if (probePointCounter == 0)
1717
 
1717
 
1718
                 eqnBVector[probePointCounter] = measured_z;
1718
                 eqnBVector[probePointCounter] = measured_z;
1719
 
1719
 
1720
-                eqnAMatrix[probePointCounter + 0*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = xProbe;
1721
-                eqnAMatrix[probePointCounter + 1*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = yProbe;
1722
-                eqnAMatrix[probePointCounter + 2*AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS] = 1;
1720
+                eqnAMatrix[probePointCounter + 0*AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS] = xProbe;
1721
+                eqnAMatrix[probePointCounter + 1*AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS] = yProbe;
1722
+                eqnAMatrix[probePointCounter + 2*AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS] = 1;
1723
                 probePointCounter++;
1723
                 probePointCounter++;
1724
                 xProbe += xInc;
1724
                 xProbe += xInc;
1725
               }
1725
               }
1727
             clean_up_after_endstop_move();
1727
             clean_up_after_endstop_move();
1728
 
1728
 
1729
             // solve lsq problem
1729
             // solve lsq problem
1730
-            double *plane_equation_coefficients = qr_solve(AUTO_BED_LEVELING_GRID_POINTS*AUTO_BED_LEVELING_GRID_POINTS, 3, eqnAMatrix, eqnBVector);
1730
+            double *plane_equation_coefficients = qr_solve(AUTO_BED_COMPENSATION_GRID_POINTS*AUTO_BED_COMPENSATION_GRID_POINTS, 3, eqnAMatrix, eqnBVector);
1731
 
1731
 
1732
             SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
1732
             SERIAL_PROTOCOLPGM("Eqn coefficients: a: ");
1733
             SERIAL_PROTOCOL(plane_equation_coefficients[0]);
1733
             SERIAL_PROTOCOL(plane_equation_coefficients[0]);
1737
             SERIAL_PROTOCOLLN(plane_equation_coefficients[2]);
1737
             SERIAL_PROTOCOLLN(plane_equation_coefficients[2]);
1738
 
1738
 
1739
 
1739
 
1740
-            set_bed_level_equation_lsq(plane_equation_coefficients);
1740
+            set_bed_compensation_equation_lsq(plane_equation_coefficients);
1741
 
1741
 
1742
             free(plane_equation_coefficients);
1742
             free(plane_equation_coefficients);
1743
 
1743
 
1744
-#else // AUTO_BED_LEVELING_GRID not defined
1744
+#else // AUTO_BED_COMPENSATION_GRID not defined
1745
 
1745
 
1746
             // Probe at 3 arbitrary points
1746
             // Probe at 3 arbitrary points
1747
             // probe 1
1747
             // probe 1
1755
 
1755
 
1756
             clean_up_after_endstop_move();
1756
             clean_up_after_endstop_move();
1757
 
1757
 
1758
-            set_bed_level_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
1758
+            set_bed_compensation_equation_3pts(z_at_pt_1, z_at_pt_2, z_at_pt_3);
1759
 
1759
 
1760
 
1760
 
1761
-#endif // AUTO_BED_LEVELING_GRID
1761
+#endif // AUTO_BED_COMPENSATION_GRID
1762
             st_synchronize();
1762
             st_synchronize();
1763
 
1763
 
1764
             // The following code correct the Z height difference from z-probe position and hotend tip position.
1764
             // The following code correct the Z height difference from z-probe position and hotend tip position.
1765
             // The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend.
1765
             // The Z height on homing is measured by Z-Probe, but the probe is quite far from the hotend.
1766
             // When the bed is uneven, this height must be corrected.
1766
             // When the bed is uneven, this height must be corrected.
1767
-            real_z = float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed leveling is already correcting the plane)
1767
+            real_z = float(st_get_position(Z_AXIS))/axis_steps_per_unit[Z_AXIS];  //get the real Z (since the auto bed compensation is already correcting the plane)
1768
             x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
1768
             x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
1769
             y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER;
1769
             y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER;
1770
             z_tmp = current_position[Z_AXIS];
1770
             z_tmp = current_position[Z_AXIS];
1771
 
1771
 
1772
-            apply_rotation_xyz(plan_bed_level_matrix, x_tmp, y_tmp, z_tmp);         //Apply the correction sending the probe offset
1772
+            apply_rotation_xyz(plan_bed_compensation_matrix, x_tmp, y_tmp, z_tmp);         //Apply the correction sending the probe offset
1773
             current_position[Z_AXIS] = z_tmp - real_z + current_position[Z_AXIS];   //The difference is added to current position and sent to planner.
1773
             current_position[Z_AXIS] = z_tmp - real_z + current_position[Z_AXIS];   //The difference is added to current position and sent to planner.
1774
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1774
             plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1775
 #ifdef Z_PROBE_SLED
1775
 #ifdef Z_PROBE_SLED
1782
         {
1782
         {
1783
             engage_z_probe(); // Engage Z Servo endstop if available
1783
             engage_z_probe(); // Engage Z Servo endstop if available
1784
             st_synchronize();
1784
             st_synchronize();
1785
-            // TODO: make sure the bed_level_rotation_matrix is identity or the planner will get set incorectly
1785
+            // TODO: make sure the bed_compensation_rotation_matrix is identity or the planner will get set incorectly
1786
             setup_for_endstop_move();
1786
             setup_for_endstop_move();
1787
 
1787
 
1788
             feedrate = homing_feedrate[Z_AXIS];
1788
             feedrate = homing_feedrate[Z_AXIS];
1809
         dock_sled(false);
1809
         dock_sled(false);
1810
         break;
1810
         break;
1811
 #endif // Z_PROBE_SLED
1811
 #endif // Z_PROBE_SLED
1812
-#endif // ENABLE_AUTO_BED_LEVELING
1812
+#endif // ENABLE_AUTO_BED_COMPENSATION
1813
     case 90: // G90
1813
     case 90: // G90
1814
       relative_mode = false;
1814
       relative_mode = false;
1815
       break;
1815
       break;
2068
 //	
2068
 //	
2069
 // This function assumes the bed has been homed.  Specificaly, that a G28 command
2069
 // This function assumes the bed has been homed.  Specificaly, that a G28 command
2070
 // as been issued prior to invoking the M48 Z-Probe repeatability measurement function.
2070
 // as been issued prior to invoking the M48 Z-Probe repeatability measurement function.
2071
-// Any information generated by a prior G29 Bed leveling command will be lost and need to be
2071
+// Any information generated by a prior G29 Bed compensation command will be lost and need to be
2072
 // regenerated.
2072
 // regenerated.
2073
 //
2073
 //
2074
 // The number of samples will default to 10 if not specified.  You can use upper or lower case
2074
 // The number of samples will default to 10 if not specified.  You can use upper or lower case
2076
 // N for its communication protocol and will get horribly confused if you send it a capital N.
2076
 // N for its communication protocol and will get horribly confused if you send it a capital N.
2077
 //
2077
 //
2078
 
2078
 
2079
-#ifdef ENABLE_AUTO_BED_LEVELING
2079
+#ifdef ENABLE_AUTO_BED_COMPENSATION
2080
 #ifdef Z_PROBE_REPEATABILITY_TEST 
2080
 #ifdef Z_PROBE_REPEATABILITY_TEST 
2081
 
2081
 
2082
     case 48: // M48 Z-Probe repeatability
2082
     case 48: // M48 Z-Probe repeatability
2154
 //
2154
 //
2155
 
2155
 
2156
         st_synchronize();
2156
         st_synchronize();
2157
-        plan_bed_level_matrix.set_to_identity();
2157
+        plan_bed_compensation_matrix.set_to_identity();
2158
 	plan_buffer_line( X_current, Y_current, Z_start_location,
2158
 	plan_buffer_line( X_current, Y_current, Z_start_location,
2159
 			ext_position,
2159
 			ext_position,
2160
     			homing_feedrate[Z_AXIS]/60,
2160
     			homing_feedrate[Z_AXIS]/60,
2333
         break;
2333
         break;
2334
 	}
2334
 	}
2335
 #endif		// Z_PROBE_REPEATABILITY_TEST 
2335
 #endif		// Z_PROBE_REPEATABILITY_TEST 
2336
-#endif		// ENABLE_AUTO_BED_LEVELING
2336
+#endif		// ENABLE_AUTO_BED_COMPENSATION
2337
 
2337
 
2338
     case 104: // M104
2338
     case 104: // M104
2339
       if(setTargetedHotend(104)){
2339
       if(setTargetedHotend(104)){
3093
         if (code_seen('S')) {
3093
         if (code_seen('S')) {
3094
           servo_position = code_value();
3094
           servo_position = code_value();
3095
           if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) {
3095
           if ((servo_index >= 0) && (servo_index < NUM_SERVOS)) {
3096
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
3096
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
3097
 		      servos[servo_index].attach(0);
3097
 		      servos[servo_index].attach(0);
3098
 #endif
3098
 #endif
3099
             servos[servo_index].write(servo_position);
3099
             servos[servo_index].write(servo_position);
3100
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
3100
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
3101
               delay(PROBE_SERVO_DEACTIVATION_DELAY);
3101
               delay(PROBE_SERVO_DEACTIVATION_DELAY);
3102
               servos[servo_index].detach();
3102
               servos[servo_index].detach();
3103
 #endif
3103
 #endif
3362
       st_synchronize();
3362
       st_synchronize();
3363
     }
3363
     }
3364
     break;
3364
     break;
3365
-#if defined(ENABLE_AUTO_BED_LEVELING) && defined(SERVO_ENDSTOPS) && not defined(Z_PROBE_SLED)
3365
+#if defined(ENABLE_AUTO_BED_COMPENSATION) && defined(SERVO_ENDSTOPS) && not defined(Z_PROBE_SLED)
3366
     case 401:
3366
     case 401:
3367
     {
3367
     {
3368
         engage_z_probe();    // Engage Z Servo endstop if available
3368
         engage_z_probe();    // Engage Z Servo endstop if available

+ 1
- 1
Marlin/Servo.cpp Parādīt failu

262
 uint8_t Servo::attach(int pin, int min, int max)
262
 uint8_t Servo::attach(int pin, int min, int max)
263
 {
263
 {
264
   if(this->servoIndex < MAX_SERVOS ) {
264
   if(this->servoIndex < MAX_SERVOS ) {
265
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
265
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
266
     if (pin > 0) this->pin = pin; else pin = this->pin;
266
     if (pin > 0) this->pin = pin; else pin = this->pin;
267
 #endif
267
 #endif
268
     pinMode( pin, OUTPUT) ;                                   // set servo pin to output
268
     pinMode( pin, OUTPUT) ;                                   // set servo pin to output

+ 1
- 1
Marlin/Servo.h Parādīt failu

123
   int read();                        // returns current pulse width as an angle between 0 and 180 degrees
123
   int read();                        // returns current pulse width as an angle between 0 and 180 degrees
124
   int readMicroseconds();            // returns current pulse width in microseconds for this servo (was read_us() in first release)
124
   int readMicroseconds();            // returns current pulse width in microseconds for this servo (was read_us() in first release)
125
   bool attached();                   // return true if this servo is attached, otherwise false
125
   bool attached();                   // return true if this servo is attached, otherwise false
126
-#if defined (ENABLE_AUTO_BED_LEVELING) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
126
+#if defined (ENABLE_AUTO_BED_COMPENSATION) && (PROBE_SERVO_DEACTIVATION_DELAY > 0)
127
   int pin;                           // store the hardware pin of the servo
127
   int pin;                           // store the hardware pin of the servo
128
 #endif
128
 #endif
129
 private:
129
 private:

+ 16
- 16
Marlin/planner.cpp Parādīt failu

75
 float mintravelfeedrate;
75
 float mintravelfeedrate;
76
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
76
 unsigned long axis_steps_per_sqr_second[NUM_AXIS];
77
 
77
 
78
-#ifdef ENABLE_AUTO_BED_LEVELING
79
-// this holds the required transform to compensate for bed level
80
-matrix_3x3 plan_bed_level_matrix = {
78
+#ifdef ENABLE_AUTO_BED_COMPENSATION
79
+// this holds the required transform to compensate for bed compensation
80
+matrix_3x3 plan_bed_compensation_matrix = {
81
 	1.0, 0.0, 0.0,
81
 	1.0, 0.0, 0.0,
82
 	0.0, 1.0, 0.0,
82
 	0.0, 1.0, 0.0,
83
 	0.0, 0.0, 1.0,
83
 	0.0, 0.0, 1.0,
84
 };
84
 };
85
-#endif // #ifdef ENABLE_AUTO_BED_LEVELING
85
+#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
86
 
86
 
87
 // The current position of the tool in absolute steps
87
 // The current position of the tool in absolute steps
88
 long position[NUM_AXIS];   //rescaled from extern when axis_steps_per_unit are changed by gcode
88
 long position[NUM_AXIS];   //rescaled from extern when axis_steps_per_unit are changed by gcode
528
 // Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in 
528
 // Add a new linear movement to the buffer. steps_x, _y and _z is the absolute position in 
529
 // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
529
 // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
530
 // calculation the caller must also provide the physical length of the line in millimeters.
530
 // calculation the caller must also provide the physical length of the line in millimeters.
531
-#ifdef ENABLE_AUTO_BED_LEVELING
531
+#ifdef ENABLE_AUTO_BED_COMPENSATION
532
 void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder)
532
 void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder)
533
 #else
533
 #else
534
 void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
534
 void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
535
-#endif  //ENABLE_AUTO_BED_LEVELING
535
+#endif  //ENABLE_AUTO_BED_COMPENSATION
536
 {
536
 {
537
   // Calculate the buffer head after we push this byte
537
   // Calculate the buffer head after we push this byte
538
   int next_buffer_head = next_block_index(block_buffer_head);
538
   int next_buffer_head = next_block_index(block_buffer_head);
546
     lcd_update();
546
     lcd_update();
547
   }
547
   }
548
 
548
 
549
-#ifdef ENABLE_AUTO_BED_LEVELING
550
-  apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
551
-#endif // ENABLE_AUTO_BED_LEVELING
549
+#ifdef ENABLE_AUTO_BED_COMPENSATION
550
+  apply_rotation_xyz(plan_bed_compensation_matrix, x, y, z);
551
+#endif // ENABLE_AUTO_BED_COMPENSATION
552
 
552
 
553
   // The target position of the tool in absolute steps
553
   // The target position of the tool in absolute steps
554
   // Calculate target position in absolute steps
554
   // Calculate target position in absolute steps
1021
   st_wake_up();
1021
   st_wake_up();
1022
 }
1022
 }
1023
 
1023
 
1024
-#ifdef ENABLE_AUTO_BED_LEVELING
1024
+#ifdef ENABLE_AUTO_BED_COMPENSATION
1025
 vector_3 plan_get_position() {
1025
 vector_3 plan_get_position() {
1026
 	vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
1026
 	vector_3 position = vector_3(st_get_position_mm(X_AXIS), st_get_position_mm(Y_AXIS), st_get_position_mm(Z_AXIS));
1027
 
1027
 
1028
 	//position.debug("in plan_get position");
1028
 	//position.debug("in plan_get position");
1029
-	//plan_bed_level_matrix.debug("in plan_get bed_level");
1030
-	matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_level_matrix);
1029
+	//plan_bed_compensation_matrix.debug("in plan_get bed_compensation");
1030
+	matrix_3x3 inverse = matrix_3x3::transpose(plan_bed_compensation_matrix);
1031
 	//inverse.debug("in plan_get inverse");
1031
 	//inverse.debug("in plan_get inverse");
1032
 	position.apply_rotation(inverse);
1032
 	position.apply_rotation(inverse);
1033
 	//position.debug("after rotation");
1033
 	//position.debug("after rotation");
1034
 
1034
 
1035
 	return position;
1035
 	return position;
1036
 }
1036
 }
1037
-#endif // ENABLE_AUTO_BED_LEVELING
1037
+#endif // ENABLE_AUTO_BED_COMPENSATION
1038
 
1038
 
1039
-#ifdef ENABLE_AUTO_BED_LEVELING
1039
+#ifdef ENABLE_AUTO_BED_COMPENSATION
1040
 void plan_set_position(float x, float y, float z, const float &e)
1040
 void plan_set_position(float x, float y, float z, const float &e)
1041
 {
1041
 {
1042
-  apply_rotation_xyz(plan_bed_level_matrix, x, y, z);
1042
+  apply_rotation_xyz(plan_bed_compensation_matrix, x, y, z);
1043
 #else
1043
 #else
1044
 void plan_set_position(const float &x, const float &y, const float &z, const float &e)
1044
 void plan_set_position(const float &x, const float &y, const float &z, const float &e)
1045
 {
1045
 {
1046
-#endif // ENABLE_AUTO_BED_LEVELING
1046
+#endif // ENABLE_AUTO_BED_COMPENSATION
1047
 
1047
 
1048
   position[X_AXIS] = lround(x*axis_steps_per_unit[X_AXIS]);
1048
   position[X_AXIS] = lround(x*axis_steps_per_unit[X_AXIS]);
1049
   position[Y_AXIS] = lround(y*axis_steps_per_unit[Y_AXIS]);
1049
   position[Y_AXIS] = lround(y*axis_steps_per_unit[Y_AXIS]);

+ 11
- 11
Marlin/planner.h Parādīt failu

26
 
26
 
27
 #include "Marlin.h"
27
 #include "Marlin.h"
28
 
28
 
29
-#ifdef ENABLE_AUTO_BED_LEVELING
29
+#ifdef ENABLE_AUTO_BED_COMPENSATION
30
 #include "vector_3.h"
30
 #include "vector_3.h"
31
-#endif // ENABLE_AUTO_BED_LEVELING
31
+#endif // ENABLE_AUTO_BED_COMPENSATION
32
 
32
 
33
 // This struct is used when buffering the setup for each linear movement "nominal" values are as specified in 
33
 // This struct is used when buffering the setup for each linear movement "nominal" values are as specified in 
34
 // the source g-code and may never actually be reached if acceleration management is active.
34
 // the source g-code and may never actually be reached if acceleration management is active.
71
   volatile char busy;
71
   volatile char busy;
72
 } block_t;
72
 } block_t;
73
 
73
 
74
-#ifdef ENABLE_AUTO_BED_LEVELING
75
-// this holds the required transform to compensate for bed level
76
-extern matrix_3x3 plan_bed_level_matrix;
77
-#endif // #ifdef ENABLE_AUTO_BED_LEVELING
74
+#ifdef ENABLE_AUTO_BED_COMPENSATION
75
+// this holds the required transform to compensate for bed compensation
76
+extern matrix_3x3 plan_bed_compensation_matrix;
77
+#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
78
 
78
 
79
 // Initialize the motion plan subsystem      
79
 // Initialize the motion plan subsystem      
80
 void plan_init();
80
 void plan_init();
82
 // Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in 
82
 // Add a new linear movement to the buffer. x, y and z is the signed, absolute target position in 
83
 // millimaters. Feed rate specifies the speed of the motion.
83
 // millimaters. Feed rate specifies the speed of the motion.
84
 
84
 
85
-#ifdef ENABLE_AUTO_BED_LEVELING
85
+#ifdef ENABLE_AUTO_BED_COMPENSATION
86
 void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder);
86
 void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder);
87
 
87
 
88
-// Get the position applying the bed level matrix if enabled
88
+// Get the position applying the bed compensation matrix if enabled
89
 vector_3 plan_get_position();
89
 vector_3 plan_get_position();
90
 #else
90
 #else
91
 void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
91
 void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
92
-#endif // ENABLE_AUTO_BED_LEVELING
92
+#endif // ENABLE_AUTO_BED_COMPENSATION
93
 
93
 
94
 // Set position. Used for G92 instructions.
94
 // Set position. Used for G92 instructions.
95
-#ifdef ENABLE_AUTO_BED_LEVELING
95
+#ifdef ENABLE_AUTO_BED_COMPENSATION
96
 void plan_set_position(float x, float y, float z, const float &e);
96
 void plan_set_position(float x, float y, float z, const float &e);
97
 #else
97
 #else
98
 void plan_set_position(const float &x, const float &y, const float &z, const float &e);
98
 void plan_set_position(const float &x, const float &y, const float &z, const float &e);
99
-#endif // ENABLE_AUTO_BED_LEVELING
99
+#endif // ENABLE_AUTO_BED_COMPENSATION
100
 
100
 
101
 void plan_set_e_position(const float &e);
101
 void plan_set_e_position(const float &e);
102
 
102
 

+ 1
- 1
Marlin/qr_solve.cpp Parādīt failu

1
 #include "qr_solve.h"
1
 #include "qr_solve.h"
2
 
2
 
3
-#ifdef AUTO_BED_LEVELING_GRID
3
+#ifdef AUTO_BED_COMPENSATION_GRID
4
 
4
 
5
 #include <stdlib.h>
5
 #include <stdlib.h>
6
 #include <math.h>
6
 #include <math.h>

+ 1
- 1
Marlin/qr_solve.h Parādīt failu

1
 #include "Configuration.h"
1
 #include "Configuration.h"
2
 
2
 
3
-#ifdef AUTO_BED_LEVELING_GRID
3
+#ifdef AUTO_BED_COMPENSATION_GRID
4
 
4
 
5
 void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
5
 void daxpy ( int n, double da, double dx[], int incx, double dy[], int incy );
6
 double ddot ( int n, double dx[], int incx, double dy[], int incy );
6
 double ddot ( int n, double dx[], int incx, double dy[], int incy );

+ 3
- 3
Marlin/vector_3.cpp Parādīt failu

1
 /*
1
 /*
2
-  vector_3.cpp - Vector library for bed leveling
2
+  vector_3.cpp - Vector library for bed compensation
3
   Copyright (c) 2012 Lars Brubaker.  All right reserved.
3
   Copyright (c) 2012 Lars Brubaker.  All right reserved.
4
 
4
 
5
   This library is free software; you can redistribute it and/or
5
   This library is free software; you can redistribute it and/or
19
 #include <math.h>
19
 #include <math.h>
20
 #include "Marlin.h"
20
 #include "Marlin.h"
21
 
21
 
22
-#ifdef ENABLE_AUTO_BED_LEVELING
22
+#ifdef ENABLE_AUTO_BED_COMPENSATION
23
 #include "vector_3.h"
23
 #include "vector_3.h"
24
 
24
 
25
 vector_3::vector_3() : x(0), y(0), z(0) { }
25
 vector_3::vector_3() : x(0), y(0), z(0) { }
163
 	}
163
 	}
164
 }
164
 }
165
 
165
 
166
-#endif // #ifdef ENABLE_AUTO_BED_LEVELING
166
+#endif // #ifdef ENABLE_AUTO_BED_COMPENSATION
167
 
167
 

+ 3
- 3
Marlin/vector_3.h Parādīt failu

1
 /*
1
 /*
2
-  vector_3.cpp - Vector library for bed leveling
2
+  vector_3.cpp - Vector library for bed compensation
3
   Copyright (c) 2012 Lars Brubaker.  All right reserved.
3
   Copyright (c) 2012 Lars Brubaker.  All right reserved.
4
 
4
 
5
   This library is free software; you can redistribute it and/or
5
   This library is free software; you can redistribute it and/or
19
 #ifndef VECTOR_3_H
19
 #ifndef VECTOR_3_H
20
 #define VECTOR_3_H
20
 #define VECTOR_3_H
21
 
21
 
22
-#ifdef ENABLE_AUTO_BED_LEVELING
22
+#ifdef ENABLE_AUTO_BED_COMPENSATION
23
 class matrix_3x3;
23
 class matrix_3x3;
24
 
24
 
25
 struct vector_3
25
 struct vector_3
57
 
57
 
58
 
58
 
59
 void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
59
 void apply_rotation_xyz(matrix_3x3 rotationMatrix, float &x, float& y, float& z);
60
-#endif // ENABLE_AUTO_BED_LEVELING
60
+#endif // ENABLE_AUTO_BED_COMPENSATION
61
 
61
 
62
 #endif // VECTOR_3_H
62
 #endif // VECTOR_3_H

+ 4
- 4
README.md Parādīt failu

53
 *   Configurable serial port to support connection of wireless adaptors.
53
 *   Configurable serial port to support connection of wireless adaptors.
54
 *   Automatic operation of extruder/cold-end cooling fans based on nozzle temperature
54
 *   Automatic operation of extruder/cold-end cooling fans based on nozzle temperature
55
 *   RC Servo Support, specify angle or duration for continuous rotation servos.
55
 *   RC Servo Support, specify angle or duration for continuous rotation servos.
56
-*   Bed Auto Leveling.
56
+*   Auto Bed Compensation.
57
 *   Support for a filament diameter sensor, which adjusts extrusion volume
57
 *   Support for a filament diameter sensor, which adjusts extrusion volume
58
 
58
 
59
 The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
59
 The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.
279
 That's ok.  Enjoy Silky Smooth Printing.
279
 That's ok.  Enjoy Silky Smooth Printing.
280
 
280
 
281
 ===============================================
281
 ===============================================
282
-Instructions for configuring Bed Auto Leveling
282
+Instructions for configuring Auto Bed Compensation
283
 ===============================================
283
 ===============================================
284
 There are two options for this feature. You may choose to use a servo mounted on the X carriage or you may use a sled that mounts on the X axis and can be docked when not in use.
284
 There are two options for this feature. You may choose to use a servo mounted on the X carriage or you may use a sled that mounts on the X axis and can be docked when not in use.
285
 See the section for each option below for specifics about installation and configuration. Also included are instructions that apply to both options.
285
 See the section for each option below for specifics about installation and configuration. Also included are instructions that apply to both options.
295
 Instructions for Both Options
295
 Instructions for Both Options
296
 -----------------------------
296
 -----------------------------
297
 
297
 
298
-Uncomment the "ENABLE_AUTO_BED_LEVELING" define (commented by default)
298
+Uncomment the "ENABLE_AUTO_BED_COMPENSATION" define (commented by default)
299
 
299
 
300
 The following options define the probing positions. These are good starting values.
300
 The following options define the probing positions. These are good starting values.
301
 I recommend to keep a better clearance from borders in the first run and then make the probes as close as possible to borders:
301
 I recommend to keep a better clearance from borders in the first run and then make the probes as close as possible to borders:
391
 * \#define Y_PROBE_OFFSET_FROM_EXTRUDER 10
391
 * \#define Y_PROBE_OFFSET_FROM_EXTRUDER 10
392
 * \#define Z_PROBE_OFFSET_FROM_EXTRUDER 2.75
392
 * \#define Z_PROBE_OFFSET_FROM_EXTRUDER 2.75
393
 
393
 
394
-That's it.. enjoy never having to calibrate your Z endstop neither leveling your bed by hand anymore ;-)
394
+That's it.. enjoy never having to calibrate your Z endstop neither tramming your bed by hand anymore ;-)
395
 
395
 
396
 Filament Sensor
396
 Filament Sensor
397
 ---------------
397
 ---------------

Notiek ielāde…
Atcelt
Saglabāt