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

+ 3
- 3
Marlin/planner.cpp View File

1114
  * On CORE machines stepper ABC will be translated from the given XYZ.
1114
  * On CORE machines stepper ABC will be translated from the given XYZ.
1115
  */
1115
  */
1116
 #if ENABLED(AUTO_BED_LEVELING_FEATURE) || ENABLED(MESH_BED_LEVELING)
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
 #else
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
 #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
1120
 #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
1121
   {
1121
   {
1122
     #if ENABLED(MESH_BED_LEVELING)
1122
     #if ENABLED(MESH_BED_LEVELING)
1138
 /**
1138
 /**
1139
  * Directly set the planner E position (hence the stepper E position).
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
   position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
1142
   position[E_AXIS] = lround(e * axis_steps_per_unit[E_AXIS]);
1143
   stepper.set_e_position(position[E_AXIS]);
1143
   stepper.set_e_position(position[E_AXIS]);
1144
 }
1144
 }

+ 3
- 3
Marlin/planner.h View File

216
        *
216
        *
217
        * Clears previous speed values.
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
     #else
221
     #else
222
 
222
 
223
       static void buffer_line(const float& x, const float& y, const float& z, const float& e, float feed_rate, const uint8_t extruder);
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
     #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
226
     #endif // AUTO_BED_LEVELING_FEATURE || MESH_BED_LEVELING
227
 
227
 
228
     /**
228
     /**
229
      * Set the E position (mm) of the planner (and the E stepper)
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
      * Does the buffer have any blocks queued?
234
      * Does the buffer have any blocks queued?

+ 1
- 1
Marlin/ultralcd.cpp View File

1037
     if (LCD_CLICKED) {
1037
     if (LCD_CLICKED) {
1038
       _lcd_level_bed_position = 0;
1038
       _lcd_level_bed_position = 0;
1039
       current_position[Z_AXIS] = MESH_HOME_SEARCH_Z;
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
       lcd_goto_menu(_lcd_level_goto_next_point, true);
1041
       lcd_goto_menu(_lcd_level_goto_next_point, true);
1042
     }
1042
     }
1043
   }
1043
   }

Loading…
Cancel
Save