소스 검색

hop_amount => current_hop

Scott Lahteine 6 년 전
부모
커밋
0c01099f17
3개의 변경된 파일12개의 추가작업 그리고 12개의 파일을 삭제
  1. 10
    10
      Marlin/src/feature/fwretract.cpp
  2. 1
    1
      Marlin/src/feature/fwretract.h
  3. 1
    1
      Marlin/src/module/motion.cpp

+ 10
- 10
Marlin/src/feature/fwretract.cpp 파일 보기

@@ -54,7 +54,7 @@ float FWRetract::retract_length,                     // M207 S - G10 Retract len
54 54
       FWRetract::swap_retract_length,                // M207 W - G10 Swap Retract length
55 55
       FWRetract::swap_retract_recover_length,        // M208 W - G11 Swap Recover length
56 56
       FWRetract::swap_retract_recover_feedrate_mm_s, // M208 R - G11 Swap Recover feedrate
57
-      FWRetract::hop_amount;
57
+      FWRetract::current_hop;
58 58
 
59 59
 void FWRetract::reset() {
60 60
   autoretract_enabled = false;
@@ -66,7 +66,7 @@ void FWRetract::reset() {
66 66
   swap_retract_length = RETRACT_LENGTH_SWAP;
67 67
   swap_retract_recover_length = RETRACT_RECOVER_LENGTH_SWAP;
68 68
   swap_retract_recover_feedrate_mm_s = RETRACT_RECOVER_FEEDRATE_SWAP;
69
-  hop_amount = 0.0;
69
+  current_hop = 0.0;
70 70
 
71 71
   for (uint8_t i = 0; i < EXTRUDERS; ++i) {
72 72
     retracted[i] = false;
@@ -96,7 +96,7 @@ void FWRetract::retract(const bool retracting
96 96
   #endif
97 97
 ) {
98 98
 
99
-  static float hop_amount = 0.0;  // Total amount lifted, for use in recover
99
+  static float current_hop = 0.0;  // Total amount lifted, for use in recover
100 100
 
101 101
   // Prevent two retracts or recovers in a row
102 102
   if (retracted[active_extruder] == retracting) return;
@@ -125,7 +125,7 @@ void FWRetract::retract(const bool retracting
125 125
     }
126 126
     SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
127 127
     SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
128
-    SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
128
+    SERIAL_ECHOLNPAIR("current_hop ", current_hop);
129 129
   //*/
130 130
 
131 131
   const float old_feedrate_mm_s = feedrate_mm_s,
@@ -144,8 +144,8 @@ void FWRetract::retract(const bool retracting
144 144
     prepare_move_to_destination();                        // set_current_to_destination
145 145
 
146 146
     // Is a Z hop set, and has the hop not yet been done?
147
-    if (retract_zlift > 0.01 && !hop_amount) {            // Apply hop only once
148
-      hop_amount += retract_zlift;                        // Add to the hop total (again, only once)
147
+    if (retract_zlift > 0.01 && !current_hop) {           // Apply hop only once
148
+      current_hop += retract_zlift;                       // Add to the hop total (again, only once)
149 149
       destination[Z_AXIS] += retract_zlift;               // Raise Z by the zlift (M207 Z) amount
150 150
       feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS];  // Maximum Z feedrate
151 151
       prepare_move_to_destination();                      // Raise up, set_current_to_destination
@@ -153,12 +153,12 @@ void FWRetract::retract(const bool retracting
153 153
   }
154 154
   else {
155 155
     // If a hop was done and Z hasn't changed, undo the Z hop
156
-    if (hop_amount) {
157
-      current_position[Z_AXIS] += hop_amount;             // Restore the actual Z position
156
+    if (current_hop) {
157
+      current_position[Z_AXIS] += current_hop;            // Restore the actual Z position
158 158
       SYNC_PLAN_POSITION_KINEMATIC();                     // Unspoof the position planner
159 159
       feedrate_mm_s = planner.max_feedrate_mm_s[Z_AXIS];  // Z feedrate to max
160 160
       prepare_move_to_destination();                      // Lower Z, set_current_to_destination
161
-      hop_amount = 0.0;                                   // Clear the hop amount
161
+      current_hop = 0.0;                                  // Clear the hop amount
162 162
     }
163 163
 
164 164
     destination[E_AXIS] += (base_retract + (swapping ? swap_retract_recover_length : retract_recover_length)) * renormalize;
@@ -192,7 +192,7 @@ void FWRetract::retract(const bool retracting
192 192
     }
193 193
     SERIAL_ECHOLNPAIR("current_position[z] ", current_position[Z_AXIS]);
194 194
     SERIAL_ECHOLNPAIR("current_position[e] ", current_position[E_AXIS]);
195
-    SERIAL_ECHOLNPAIR("hop_amount ", hop_amount);
195
+    SERIAL_ECHOLNPAIR("current_hop ", current_hop);
196 196
   //*/
197 197
 
198 198
 }

+ 1
- 1
Marlin/src/feature/fwretract.h 파일 보기

@@ -46,7 +46,7 @@ public:
46 46
                swap_retract_length,                // M207 W - G10 Swap Retract length
47 47
                swap_retract_recover_length,        // M208 W - G11 Swap Recover length
48 48
                swap_retract_recover_feedrate_mm_s, // M208 R - G11 Swap Recover feedrate
49
-               hop_amount;
49
+               current_hop;
50 50
 
51 51
   FWRetract() { reset(); }
52 52
 

+ 1
- 1
Marlin/src/module/motion.cpp 파일 보기

@@ -1462,7 +1462,7 @@ void homeaxis(const AxisEnum axis) {
1462 1462
 
1463 1463
   // Clear retracted status if homing the Z axis
1464 1464
   #if ENABLED(FWRETRACT)
1465
-    if (axis == Z_AXIS) fwretract.hop_amount = 0.0;
1465
+    if (axis == Z_AXIS) fwretract.current_hop = 0.0;
1466 1466
   #endif
1467 1467
 
1468 1468
   #if ENABLED(DEBUG_LEVELING_FEATURE)

Loading…
취소
저장