Pārlūkot izejas kodu

change to better (more clear) names (#8049)

set_destination_to_current() changed to set_destination_from_current()

set_current_to_destination() changed to set_current_from_destination()
Roxy-3D 7 gadus atpakaļ
vecāks
revīzija
e9bc9a2ab4

+ 10
- 10
Marlin/G26_Mesh_Validation_Tool.cpp Parādīt failu

134
     extern char lcd_status_message[];
134
     extern char lcd_status_message[];
135
   #endif
135
   #endif
136
   extern float destination[XYZE];
136
   extern float destination[XYZE];
137
-  void set_destination_to_current();
137
+  void set_destination_from_current();
138
   void prepare_move_to_destination();
138
   void prepare_move_to_destination();
139
   inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
139
   inline void sync_plan_position_e() { planner.set_e_position_mm(current_position[E_AXIS]); }
140
-  inline void set_current_to_destination() { COPY(current_position, destination); }
140
+  inline void set_current_from_destination() { COPY(current_position, destination); }
141
   #if ENABLED(NEWPANEL)
141
   #if ENABLED(NEWPANEL)
142
     void lcd_setstatusPGM(const char* const message, const int8_t level);
142
     void lcd_setstatusPGM(const char* const message, const int8_t level);
143
     void chirp_at_user();
143
     void chirp_at_user();
225
     if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
225
     if (current_position[Z_AXIS] < Z_CLEARANCE_BETWEEN_PROBES) {
226
       do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
226
       do_blocking_move_to_z(Z_CLEARANCE_BETWEEN_PROBES);
227
       stepper.synchronize();
227
       stepper.synchronize();
228
-      set_current_to_destination();
228
+      set_current_from_destination();
229
     }
229
     }
230
 
230
 
231
     if (turn_on_heaters()) goto LEAVE;
231
     if (turn_on_heaters()) goto LEAVE;
250
     ZERO(vertical_mesh_line_flags);
250
     ZERO(vertical_mesh_line_flags);
251
 
251
 
252
     // Move nozzle to the specified height for the first layer
252
     // Move nozzle to the specified height for the first layer
253
-    set_destination_to_current();
253
+    set_destination_from_current();
254
     destination[Z_AXIS] = g26_layer_height;
254
     destination[Z_AXIS] = g26_layer_height;
255
     move_to(destination, 0.0);
255
     move_to(destination, 0.0);
256
     move_to(destination, g26_ooze_amount);
256
     move_to(destination, g26_ooze_amount);
534
       G26_line_to_destination(feed_value);
534
       G26_line_to_destination(feed_value);
535
 
535
 
536
       stepper.synchronize();
536
       stepper.synchronize();
537
-      set_destination_to_current();
537
+      set_destination_from_current();
538
     }
538
     }
539
 
539
 
540
     // Check if X or Y is involved in the movement.
540
     // Check if X or Y is involved in the movement.
550
     G26_line_to_destination(feed_value);
550
     G26_line_to_destination(feed_value);
551
 
551
 
552
     stepper.synchronize();
552
     stepper.synchronize();
553
-    set_destination_to_current();
553
+    set_destination_from_current();
554
 
554
 
555
   }
555
   }
556
 
556
 
832
         lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
832
         lcd_setstatusPGM(PSTR("User-Controlled Prime"), 99);
833
         chirp_at_user();
833
         chirp_at_user();
834
 
834
 
835
-        set_destination_to_current();
835
+        set_destination_from_current();
836
 
836
 
837
         recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
837
         recover_filament(destination); // Make sure G26 doesn't think the filament is retracted().
838
 
838
 
849
                                     // but because the planner has a buffer, we won't be able
849
                                     // but because the planner has a buffer, we won't be able
850
                                     // to stop as quickly. So we put up with the less smooth
850
                                     // to stop as quickly. So we put up with the less smooth
851
                                     // action to give the user a more responsive 'Stop'.
851
                                     // action to give the user a more responsive 'Stop'.
852
-          set_destination_to_current();
852
+          set_destination_from_current();
853
           idle();
853
           idle();
854
         }
854
         }
855
 
855
 
873
         lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
873
         lcd_setstatusPGM(PSTR("Fixed Length Prime."), 99);
874
         lcd_quick_feedback();
874
         lcd_quick_feedback();
875
       #endif
875
       #endif
876
-      set_destination_to_current();
876
+      set_destination_from_current();
877
       destination[E_AXIS] += g26_prime_length;
877
       destination[E_AXIS] += g26_prime_length;
878
       G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
878
       G26_line_to_destination(planner.max_feedrate_mm_s[E_AXIS] / 15.0);
879
       stepper.synchronize();
879
       stepper.synchronize();
880
-      set_destination_to_current();
880
+      set_destination_from_current();
881
       retract_filament(destination);
881
       retract_filament(destination);
882
     }
882
     }
883
 
883
 

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

350
                            || isnan(ubl.z_values[0][0]))
350
                            || isnan(ubl.z_values[0][0]))
351
 #endif
351
 #endif
352
 
352
 
353
-#if ENABLED(NEOPIXEL_LED) 
353
+#if ENABLED(NEOPIXEL_LED)
354
   #if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
354
   #if NEOPIXEL_TYPE == NEO_RGB || NEOPIXEL_TYPE == NEO_RBG || NEOPIXEL_TYPE == NEO_GRB || NEOPIXEL_TYPE == NEO_GBR || NEOPIXEL_TYPE == NEO_BRG || NEOPIXEL_TYPE == NEO_BGR
355
     #define NEO_WHITE 255, 255, 255
355
     #define NEO_WHITE 255, 255, 255
356
   #else
356
   #else
379
 /**
379
 /**
380
  * Cartesian Destination
380
  * Cartesian Destination
381
  *   A temporary position, usually applied to 'current_position'.
381
  *   A temporary position, usually applied to 'current_position'.
382
- *   Set with 'gcode_get_destination' or 'set_destination_to_current'.
382
+ *   Set with 'gcode_get_destination' or 'set_destination_from_current'.
383
  *   'line_to_destination' sets 'current_position' to 'destination'.
383
  *   'line_to_destination' sets 'current_position' to 'destination'.
384
  */
384
  */
385
 float destination[XYZE] = { 0.0 };
385
 float destination[XYZE] = { 0.0 };
1633
 }
1633
 }
1634
 inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
1634
 inline void line_to_destination() { line_to_destination(feedrate_mm_s); }
1635
 
1635
 
1636
-inline void set_current_to_destination() { COPY(current_position, destination); }
1637
-inline void set_destination_to_current() { COPY(destination, current_position); }
1636
+inline void set_current_from_destination() { COPY(current_position, destination); }
1637
+inline void set_destination_from_current() { COPY(destination, current_position); }
1638
 
1638
 
1639
 #if IS_KINEMATIC
1639
 #if IS_KINEMATIC
1640
   /**
1640
   /**
1660
       planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
1660
       planner.buffer_line_kinematic(destination, MMS_SCALED(fr_mm_s ? fr_mm_s : feedrate_mm_s), active_extruder);
1661
     #endif
1661
     #endif
1662
 
1662
 
1663
-    set_current_to_destination();
1663
+    set_current_from_destination();
1664
   }
1664
   }
1665
 #endif // IS_KINEMATIC
1665
 #endif // IS_KINEMATIC
1666
 
1666
 
1681
 
1681
 
1682
     feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
1682
     feedrate_mm_s = fr_mm_s ? fr_mm_s : XY_PROBE_FEEDRATE_MM_S;
1683
 
1683
 
1684
-    set_destination_to_current();          // sync destination at the start
1684
+    set_destination_from_current();          // sync destination at the start
1685
 
1685
 
1686
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1686
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1687
-      if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_to_current", destination);
1687
+      if (DEBUGGING(LEVELING)) DEBUG_POS("set_destination_from_current", destination);
1688
     #endif
1688
     #endif
1689
 
1689
 
1690
     // when in the danger zone
1690
     // when in the danger zone
1693
         destination[X_AXIS] = lx;           // move directly (uninterpolated)
1693
         destination[X_AXIS] = lx;           // move directly (uninterpolated)
1694
         destination[Y_AXIS] = ly;
1694
         destination[Y_AXIS] = ly;
1695
         destination[Z_AXIS] = lz;
1695
         destination[Z_AXIS] = lz;
1696
-        prepare_uninterpolated_move_to_destination(); // set_current_to_destination
1696
+        prepare_uninterpolated_move_to_destination(); // set_current_from_destination
1697
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1697
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1698
           if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position);
1698
           if (DEBUGGING(LEVELING)) DEBUG_POS("danger zone move", current_position);
1699
         #endif
1699
         #endif
1701
       }
1701
       }
1702
       else {
1702
       else {
1703
         destination[Z_AXIS] = delta_clip_start_height;
1703
         destination[Z_AXIS] = delta_clip_start_height;
1704
-        prepare_uninterpolated_move_to_destination(); // set_current_to_destination
1704
+        prepare_uninterpolated_move_to_destination(); // set_current_from_destination
1705
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1705
         #if ENABLED(DEBUG_LEVELING_FEATURE)
1706
           if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
1706
           if (DEBUGGING(LEVELING)) DEBUG_POS("zone border move", current_position);
1707
         #endif
1707
         #endif
1710
 
1710
 
1711
     if (lz > current_position[Z_AXIS]) {    // raising?
1711
     if (lz > current_position[Z_AXIS]) {    // raising?
1712
       destination[Z_AXIS] = lz;
1712
       destination[Z_AXIS] = lz;
1713
-      prepare_uninterpolated_move_to_destination();   // set_current_to_destination
1713
+      prepare_uninterpolated_move_to_destination();   // set_current_from_destination
1714
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1714
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1715
         if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
1715
         if (DEBUGGING(LEVELING)) DEBUG_POS("z raise move", current_position);
1716
       #endif
1716
       #endif
1718
 
1718
 
1719
     destination[X_AXIS] = lx;
1719
     destination[X_AXIS] = lx;
1720
     destination[Y_AXIS] = ly;
1720
     destination[Y_AXIS] = ly;
1721
-    prepare_move_to_destination();         // set_current_to_destination
1721
+    prepare_move_to_destination();         // set_current_from_destination
1722
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1722
     #if ENABLED(DEBUG_LEVELING_FEATURE)
1723
       if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position);
1723
       if (DEBUGGING(LEVELING)) DEBUG_POS("xy move", current_position);
1724
     #endif
1724
     #endif
1725
 
1725
 
1726
     if (lz < current_position[Z_AXIS]) {    // lowering?
1726
     if (lz < current_position[Z_AXIS]) {    // lowering?
1727
       destination[Z_AXIS] = lz;
1727
       destination[Z_AXIS] = lz;
1728
-      prepare_uninterpolated_move_to_destination();   // set_current_to_destination
1728
+      prepare_uninterpolated_move_to_destination();   // set_current_from_destination
1729
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1729
       #if ENABLED(DEBUG_LEVELING_FEATURE)
1730
         if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
1730
         if (DEBUGGING(LEVELING)) DEBUG_POS("z lower move", current_position);
1731
       #endif
1731
       #endif
1735
 
1735
 
1736
     if (!position_is_reachable_xy(lx, ly)) return;
1736
     if (!position_is_reachable_xy(lx, ly)) return;
1737
 
1737
 
1738
-    set_destination_to_current();
1738
+    set_destination_from_current();
1739
 
1739
 
1740
     // If Z needs to raise, do it before moving XY
1740
     // If Z needs to raise, do it before moving XY
1741
     if (destination[Z_AXIS] < lz) {
1741
     if (destination[Z_AXIS] < lz) {
3196
     flow_percentage[active_extruder] = 100;
3196
     flow_percentage[active_extruder] = 100;
3197
 
3197
 
3198
     // The current position will be the destination for E and Z moves
3198
     // The current position will be the destination for E and Z moves
3199
-    set_destination_to_current();
3199
+    set_destination_from_current();
3200
 
3200
 
3201
     stepper.synchronize(); // Wait for all moves to finish
3201
     stepper.synchronize(); // Wait for all moves to finish
3202
 
3202
 
3996
                homeZ = always_home_all || parser.seen('Z'),
3996
                homeZ = always_home_all || parser.seen('Z'),
3997
                home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
3997
                home_all = (!homeX && !homeY && !homeZ) || (homeX && homeY && homeZ);
3998
 
3998
 
3999
-    set_destination_to_current();
3999
+    set_destination_from_current();
4000
 
4000
 
4001
     #if Z_HOME_DIR > 0  // If homing away from BED do Z first
4001
     #if Z_HOME_DIR > 0  // If homing away from BED do Z first
4002
 
4002
 
4204
     set_bed_leveling_enabled(true);
4204
     set_bed_leveling_enabled(true);
4205
     #if ENABLED(MESH_G28_REST_ORIGIN)
4205
     #if ENABLED(MESH_G28_REST_ORIGIN)
4206
       current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
4206
       current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS);
4207
-      set_destination_to_current();
4207
+      set_destination_from_current();
4208
       line_to_destination(homing_feedrate(Z_AXIS));
4208
       line_to_destination(homing_feedrate(Z_AXIS));
4209
       stepper.synchronize();
4209
       stepper.synchronize();
4210
     #endif
4210
     #endif
5818
 
5818
 
5819
       #if ENABLED(PROBE_DOUBLE_TOUCH)
5819
       #if ENABLED(PROBE_DOUBLE_TOUCH)
5820
         // Move away by the retract distance
5820
         // Move away by the retract distance
5821
-        set_destination_to_current();
5821
+        set_destination_from_current();
5822
         LOOP_XYZ(i) destination[i] += retract_mm[i];
5822
         LOOP_XYZ(i) destination[i] += retract_mm[i];
5823
         endstops.enable(false);
5823
         endstops.enable(false);
5824
         prepare_move_to_destination();
5824
         prepare_move_to_destination();
5906
         #define _GET_MESH_Y(J) mbl.index_to_ypos[J]
5906
         #define _GET_MESH_Y(J) mbl.index_to_ypos[J]
5907
       #endif
5907
       #endif
5908
 
5908
 
5909
-      set_destination_to_current();
5909
+      set_destination_from_current();
5910
       if (hasI) destination[X_AXIS] = LOGICAL_X_POSITION(_GET_MESH_X(ix));
5910
       if (hasI) destination[X_AXIS] = LOGICAL_X_POSITION(_GET_MESH_X(ix));
5911
       if (hasJ) destination[Y_AXIS] = LOGICAL_Y_POSITION(_GET_MESH_Y(iy));
5911
       if (hasJ) destination[Y_AXIS] = LOGICAL_Y_POSITION(_GET_MESH_Y(iy));
5912
       if (parser.boolval('P')) {
5912
       if (parser.boolval('P')) {
6249
 
6249
 
6250
     if (retract) {
6250
     if (retract) {
6251
       // Initial retract before move to filament change position
6251
       // Initial retract before move to filament change position
6252
-      set_destination_to_current();
6252
+      set_destination_from_current();
6253
       destination[E_AXIS] += retract;
6253
       destination[E_AXIS] += retract;
6254
       RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
6254
       RUNPLAN(PAUSE_PARK_RETRACT_FEEDRATE);
6255
       stepper.synchronize();
6255
       stepper.synchronize();
6271
       }
6271
       }
6272
 
6272
 
6273
       // Unload filament
6273
       // Unload filament
6274
-      set_destination_to_current();
6274
+      set_destination_from_current();
6275
       destination[E_AXIS] += unload_length;
6275
       destination[E_AXIS] += unload_length;
6276
       RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE);
6276
       RUNPLAN(FILAMENT_CHANGE_UNLOAD_FEEDRATE);
6277
       stepper.synchronize();
6277
       stepper.synchronize();
6375
       filament_change_beep(max_beep_count, true);
6375
       filament_change_beep(max_beep_count, true);
6376
     #endif
6376
     #endif
6377
 
6377
 
6378
-    set_destination_to_current();
6378
+    set_destination_from_current();
6379
 
6379
 
6380
     if (load_length != 0) {
6380
     if (load_length != 0) {
6381
       #if ENABLED(ULTIPANEL)
6381
       #if ENABLED(ULTIPANEL)
10476
         }
10476
         }
10477
 
10477
 
10478
         // Save current position to destination, for use later
10478
         // Save current position to destination, for use later
10479
-        set_destination_to_current();
10479
+        set_destination_from_current();
10480
 
10480
 
10481
         #if ENABLED(DUAL_X_CARRIAGE)
10481
         #if ENABLED(DUAL_X_CARRIAGE)
10482
 
10482
 
12240
     if (cx1 == cx2 && cy1 == cy2) {
12240
     if (cx1 == cx2 && cy1 == cy2) {
12241
       // Start and end on same mesh square
12241
       // Start and end on same mesh square
12242
       line_to_destination(fr_mm_s);
12242
       line_to_destination(fr_mm_s);
12243
-      set_current_to_destination();
12243
+      set_current_from_destination();
12244
       return;
12244
       return;
12245
     }
12245
     }
12246
 
12246
 
12267
     else {
12267
     else {
12268
       // Already split on a border
12268
       // Already split on a border
12269
       line_to_destination(fr_mm_s);
12269
       line_to_destination(fr_mm_s);
12270
-      set_current_to_destination();
12270
+      set_current_from_destination();
12271
       return;
12271
       return;
12272
     }
12272
     }
12273
 
12273
 
12303
     if (cx1 == cx2 && cy1 == cy2) {
12303
     if (cx1 == cx2 && cy1 == cy2) {
12304
       // Start and end on same mesh square
12304
       // Start and end on same mesh square
12305
       line_to_destination(fr_mm_s);
12305
       line_to_destination(fr_mm_s);
12306
-      set_current_to_destination();
12306
+      set_current_from_destination();
12307
       return;
12307
       return;
12308
     }
12308
     }
12309
 
12309
 
12330
     else {
12330
     else {
12331
       // Already split on a border
12331
       // Already split on a border
12332
       line_to_destination(fr_mm_s);
12332
       line_to_destination(fr_mm_s);
12333
-      set_current_to_destination();
12333
+      set_current_from_destination();
12334
       return;
12334
       return;
12335
     }
12335
     }
12336
 
12336
 
12521
             // Skip it, but keep track of the current position
12521
             // Skip it, but keep track of the current position
12522
             // (so it can be used as the start of the next non-travel move)
12522
             // (so it can be used as the start of the next non-travel move)
12523
             if (delayed_move_time != 0xFFFFFFFFUL) {
12523
             if (delayed_move_time != 0xFFFFFFFFUL) {
12524
-              set_current_to_destination();
12524
+              set_current_from_destination();
12525
               NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
12525
               NOLESS(raised_parked_position[Z_AXIS], destination[Z_AXIS]);
12526
               delayed_move_time = millis();
12526
               delayed_move_time = millis();
12527
               return true;
12527
               return true;
12627
     #endif
12627
     #endif
12628
   ) return;
12628
   ) return;
12629
 
12629
 
12630
-  set_current_to_destination();
12630
+  set_current_from_destination();
12631
 }
12631
 }
12632
 
12632
 
12633
 #if ENABLED(ARC_SUPPORT)
12633
 #if ENABLED(ARC_SUPPORT)
12784
     // As far as the parser is concerned, the position is now == target. In reality the
12784
     // As far as the parser is concerned, the position is now == target. In reality the
12785
     // motion control system might still be processing the action and the real tool position
12785
     // motion control system might still be processing the action and the real tool position
12786
     // in any intermediate location.
12786
     // in any intermediate location.
12787
-    set_current_to_destination();
12787
+    set_current_from_destination();
12788
   } // plan_arc
12788
   } // plan_arc
12789
 
12789
 
12790
 #endif // ARC_SUPPORT
12790
 #endif // ARC_SUPPORT
12797
     // As far as the parser is concerned, the position is now == destination. In reality the
12797
     // As far as the parser is concerned, the position is now == destination. In reality the
12798
     // motion control system might still be processing the action and the real tool position
12798
     // motion control system might still be processing the action and the real tool position
12799
     // in any intermediate location.
12799
     // in any intermediate location.
12800
-    set_current_to_destination();
12800
+    set_current_from_destination();
12801
   }
12801
   }
12802
 
12802
 
12803
 #endif // BEZIER_CURVE_SUPPORT
12803
 #endif // BEZIER_CURVE_SUPPORT
13321
     if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) {
13321
     if (delayed_move_time && ELAPSED(ms, delayed_move_time + 1000UL) && IsRunning()) {
13322
       // travel moves have been received so enact them
13322
       // travel moves have been received so enact them
13323
       delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
13323
       delayed_move_time = 0xFFFFFFFFUL; // force moves to be done
13324
-      set_destination_to_current();
13324
+      set_destination_from_current();
13325
       prepare_move_to_destination();
13325
       prepare_move_to_destination();
13326
     }
13326
     }
13327
   #endif
13327
   #endif

+ 9
- 9
Marlin/ubl_motion.cpp Parādīt failu

33
   extern float destination[XYZE];
33
   extern float destination[XYZE];
34
 
34
 
35
   #if AVR_AT90USB1286_FAMILY  // Teensyduino & Printrboard IDE extensions have compile errors without this
35
   #if AVR_AT90USB1286_FAMILY  // Teensyduino & Printrboard IDE extensions have compile errors without this
36
-    inline void set_current_to_destination() { COPY(current_position, destination); }
36
+    inline void set_current_from_destination() { COPY(current_position, destination); }
37
   #else
37
   #else
38
-    extern void set_current_to_destination();
38
+    extern void set_current_from_destination();
39
   #endif
39
   #endif
40
 
40
 
41
 #if ENABLED(DELTA)
41
 #if ENABLED(DELTA)
154
         // a reasonable correction would be.
154
         // a reasonable correction would be.
155
 
155
 
156
         planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
156
         planner._buffer_line(end[X_AXIS], end[Y_AXIS], end[Z_AXIS], end[E_AXIS], feed_rate, extruder);
157
-        set_current_to_destination();
157
+        set_current_from_destination();
158
 
158
 
159
         if (g26_debug_flag)
159
         if (g26_debug_flag)
160
           debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
160
           debug_current_and_destination(PSTR("out of bounds in ubl.line_to_destination()"));
202
       if (g26_debug_flag)
202
       if (g26_debug_flag)
203
         debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
203
         debug_current_and_destination(PSTR("FINAL_MOVE in ubl.line_to_destination()"));
204
 
204
 
205
-      set_current_to_destination();
205
+      set_current_from_destination();
206
       return;
206
       return;
207
     }
207
     }
208
 
208
 
314
       if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
314
       if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
315
         goto FINAL_MOVE;
315
         goto FINAL_MOVE;
316
 
316
 
317
-      set_current_to_destination();
317
+      set_current_from_destination();
318
       return;
318
       return;
319
     }
319
     }
320
 
320
 
375
       if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
375
       if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
376
         goto FINAL_MOVE;
376
         goto FINAL_MOVE;
377
 
377
 
378
-      set_current_to_destination();
378
+      set_current_from_destination();
379
       return;
379
       return;
380
     }
380
     }
381
 
381
 
469
     if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
469
     if (current_position[X_AXIS] != end[X_AXIS] || current_position[Y_AXIS] != end[Y_AXIS])
470
       goto FINAL_MOVE;
470
       goto FINAL_MOVE;
471
 
471
 
472
-    set_current_to_destination();
472
+    set_current_from_destination();
473
   }
473
   }
474
 
474
 
475
   #if UBL_DELTA
475
   #if UBL_DELTA
619
 
619
 
620
         } while (segments);
620
         } while (segments);
621
 
621
 
622
-        return false; // moved but did not set_current_to_destination();
622
+        return false; // moved but did not set_current_from_destination();
623
       }
623
       }
624
 
624
 
625
       // Otherwise perform per-segment leveling
625
       // Otherwise perform per-segment leveling
700
           ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate );
700
           ubl_buffer_segment_raw( seg_rx, seg_ry, seg_rz + z_cxcy, seg_le, feedrate );
701
 
701
 
702
           if (segments == 0 )                       // done with last segment
702
           if (segments == 0 )                       // done with last segment
703
-            return false;                           // did not set_current_to_destination()
703
+            return false;                           // did not set_current_from_destination()
704
 
704
 
705
           seg_rx += seg_dx;
705
           seg_rx += seg_dx;
706
           seg_ry += seg_dy;
706
           seg_ry += seg_dy;

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

2794
   #if IS_KINEMATIC
2794
   #if IS_KINEMATIC
2795
     extern float feedrate_mm_s;
2795
     extern float feedrate_mm_s;
2796
     extern float destination[XYZE];
2796
     extern float destination[XYZE];
2797
-    void set_destination_to_current();
2797
+    void set_destination_from_current();
2798
     void prepare_move_to_destination();
2798
     void prepare_move_to_destination();
2799
   #endif
2799
   #endif
2800
 
2800
 
2819
         #endif
2819
         #endif
2820
 
2820
 
2821
         // Set movement on a single axis
2821
         // Set movement on a single axis
2822
-        set_destination_to_current();
2822
+        set_destination_from_current();
2823
         destination[manual_move_axis] += manual_move_offset;
2823
         destination[manual_move_axis] += manual_move_offset;
2824
 
2824
 
2825
         // Reset for the next move
2825
         // Reset for the next move
2831
         // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
2831
         // previous invocation is being blocked. Modifications to manual_move_offset shouldn't be made while
2832
         // processing_manual_move is true or the planner will get out of sync.
2832
         // processing_manual_move is true or the planner will get out of sync.
2833
         processing_manual_move = true;
2833
         processing_manual_move = true;
2834
-        prepare_move_to_destination(); // will call set_current_to_destination
2834
+        prepare_move_to_destination(); // will call set_current_from_destination()
2835
         processing_manual_move = false;
2835
         processing_manual_move = false;
2836
 
2836
 
2837
         feedrate_mm_s = old_feedrate;
2837
         feedrate_mm_s = old_feedrate;

Notiek ielāde…
Atcelt
Saglabāt