Browse Source

set_position => set_position_mm

Scott Lahteine 8 years ago
parent
commit
381bc6f0b0
4 changed files with 14 additions and 14 deletions
  1. 7
    7
      Marlin/Marlin_main.cpp
  2. 3
    3
      Marlin/planner.cpp
  3. 3
    3
      Marlin/planner.h
  4. 1
    1
      Marlin/ultralcd.cpp

+ 7
- 7
Marlin/Marlin_main.cpp View File

@@ -552,7 +552,7 @@ static void report_current_position();
552 552
       if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position_delta", current_position);
553 553
     #endif
554 554
     calculate_delta(current_position);
555
-    planner.set_position(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
555
+    planner.set_position_mm(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], current_position[E_AXIS]);
556 556
   }
557 557
 #endif
558 558
 
@@ -1448,9 +1448,9 @@ inline void sync_plan_position() {
1448 1448
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1449 1449
     if (DEBUGGING(LEVELING)) DEBUG_POS("sync_plan_position", current_position);
1450 1450
   #endif
1451
-  planner.set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1451
+  planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1452 1452
 }
1453
-inline void sync_plan_position_e() { planner.set_e_position(current_position[E_AXIS]); }
1453
+inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
1454 1454
 inline void set_current_to_destination() { memcpy(current_position, destination, sizeof(current_position)); }
1455 1455
 inline void set_destination_to_current() { memcpy(destination, current_position, sizeof(destination)); }
1456 1456
 
@@ -1607,7 +1607,7 @@ static void setup_for_endstop_move() {
1607 1607
 
1608 1608
       // Tell the planner where we ended up - Get this from the stepper handler
1609 1609
       zPosition = stepper.get_axis_position_mm(Z_AXIS);
1610
-      planner.set_position(
1610
+      planner.set_position_mm(
1611 1611
         current_position[X_AXIS], current_position[Y_AXIS], zPosition,
1612 1612
         current_position[E_AXIS]
1613 1613
       );
@@ -3593,7 +3593,7 @@ inline void gcode_G28() {
3593 3593
          * Get the current Z position and send it to the planner.
3594 3594
          *
3595 3595
          * >> (z_tmp - real_z) : The rotated current Z minus the uncorrected Z
3596
-         * (most recent planner.set_position/sync_plan_position)
3596
+         * (most recent planner.set_position_mm/sync_plan_position)
3597 3597
          *
3598 3598
          * >> zprobe_zoffset : Z distance from nozzle to Z probe
3599 3599
          * (set by default, M851, EEPROM, or Menu)
@@ -7436,7 +7436,7 @@ void mesh_buffer_line(float x, float y, float z, const float e, float feed_rate,
7436 7436
     if (active_extruder_parked) {
7437 7437
       if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && active_extruder == 0) {
7438 7438
         // move duplicate extruder into correct duplication position.
7439
-        planner.set_position(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
7439
+        planner.set_position_mm(inactive_extruder_x_pos, current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
7440 7440
         planner.buffer_line(current_position[X_AXIS] + duplicate_extruder_x_offset,
7441 7441
                          current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], planner.max_feedrate[X_AXIS], 1);
7442 7442
         sync_plan_position();
@@ -7989,7 +7989,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
7989 7989
                          (EXTRUDER_RUNOUT_SPEED) / 60. * (EXTRUDER_RUNOUT_ESTEPS) / planner.axis_steps_per_unit[E_AXIS], active_extruder);
7990 7990
       current_position[E_AXIS] = oldepos;
7991 7991
       destination[E_AXIS] = oldedes;
7992
-      planner.set_e_position(oldepos);
7992
+      planner.set_e_position_mm(oldepos);
7993 7993
       previous_cmd_ms = ms; // refresh_cmd_timeout()
7994 7994
       stepper.synchronize();
7995 7995
       switch (active_extruder) {

+ 3
- 3
Marlin/planner.cpp View File

@@ -1114,9 +1114,9 @@ void Planner::check_axes_activity() {
1114 1114
  * On CORE machines stepper ABC will be translated from the given XYZ.
1115 1115
  */
1116 1116
 #if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING)
1117
-  void Planner::set_position(float x, float y, float z, const float& e)
1117
+  void Planner::set_position_mm(float x, float y, float z, const float& e)
1118 1118
 #else
1119
-  void Planner::set_position(const float& x, const float& y, const float& z, const float& e)
1119
+  void Planner::set_position_mm(const float& x, const float& y, const float& z, const float& e)
1120 1120
 #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
1121 1121
   {
1122 1122
     #if ENABLED(MESH_BED_LEVELING)
@@ -1138,7 +1138,7 @@ void Planner::check_axes_activity() {
1138 1138
 /**
1139 1139
  * Directly set the planner E position (hence the stepper E position).
1140 1140
  */
1141
-void Planner::set_e_position(const float& e) {
1141
+void Planner::set_e_position_mm(const float& e) {
1142 1142
   position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
1143 1143
   stepper.set_e_position(position[E_AXIS]);
1144 1144
 }

+ 3
- 3
Marlin/planner.h View File

@@ -216,19 +216,19 @@ class Planner {
216 216
        *
217 217
        * Clears previous speed values.
218 218
        */
219
-      static void set_position(float x, float y, float z, const float& e);
219
+      static void set_position_mm(float x, float y, float z, const float& e);
220 220
 
221 221
     #else
222 222
 
223 223
       static void buffer_line(const float& x, const float& y, const float& z, const float& e, float feed_rate, const uint8_t extruder);
224
-      static void set_position(const float& x, const float& y, const float& z, const float& e);
224
+      static void set_position_mm(const float& x, const float& y, const float& z, const float& e);
225 225
 
226 226
     #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
227 227
 
228 228
     /**
229 229
      * Set the E position (mm) of the planner (and the E stepper)
230 230
      */
231
-    static void set_e_position(const float& e);
231
+    static void set_e_position_mm(const float& e);
232 232
 
233 233
     /**
234 234
      * Does the buffer have any blocks queued?

+ 1
- 1
Marlin/ultralcd.cpp View File

@@ -1037,7 +1037,7 @@ void lcd_cooldown() {
1037 1037
     if (LCD_CLICKED) {
1038 1038
       _lcd_level_bed_position = 0;
1039 1039
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
1040
-      planner.set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1040
+      planner.set_position_mm(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
1041 1041
       lcd_goto_menu(_lcd_level_goto_next_point, true);
1042 1042
     }
1043 1043
   }

Loading…
Cancel
Save