Sfoglia il codice sorgente

Shorten a method name

Scott Lahteine 4 anni fa
parent
commit
c75e98dc84

+ 6
- 6
Marlin/src/feature/tmc_util.h Vedi File

@@ -104,8 +104,8 @@ class TMCMarlin : public TMC, public TMCStorage<AXIS_LETTER, DRIVER_ID> {
104 104
 
105 105
     #if HAS_STEALTHCHOP
106 106
       inline void refresh_stepping_mode() { this->en_pwm_mode(this->stored.stealthChop_enabled); }
107
-      inline bool get_stealthChop_status() { return this->en_pwm_mode(); }
108
-      inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
107
+      inline bool get_stealthChop() { return this->en_pwm_mode(); }
108
+      inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; }
109 109
     #endif
110 110
 
111 111
     #if ENABLED(HYBRID_THRESHOLD)
@@ -171,8 +171,8 @@ class TMCMarlin<TMC2208Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
171 171
 
172 172
     #if HAS_STEALTHCHOP
173 173
       inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); }
174
-      inline bool get_stealthChop_status() { return !this->en_spreadCycle(); }
175
-      inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
174
+      inline bool get_stealthChop() { return !this->en_spreadCycle(); }
175
+      inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; }
176 176
     #endif
177 177
 
178 178
     #if ENABLED(HYBRID_THRESHOLD)
@@ -217,8 +217,8 @@ class TMCMarlin<TMC2209Stepper, AXIS_LETTER, DRIVER_ID, AXIS_ID> : public TMC220
217 217
 
218 218
     #if HAS_STEALTHCHOP
219 219
       inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); }
220
-      inline bool get_stealthChop_status() { return !this->en_spreadCycle(); }
221
-      inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; }
220
+      inline bool get_stealthChop() { return !this->en_spreadCycle(); }
221
+      inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; }
222 222
     #endif
223 223
 
224 224
     #if ENABLED(HYBRID_THRESHOLD)

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M569.cpp Vedi File

@@ -32,7 +32,7 @@ template<typename TMC>
32 32
 void tmc_say_stealth_status(TMC &st) {
33 33
   st.printLabel();
34 34
   SERIAL_ECHOPGM(" driver mode:\t");
35
-  serialprintPGM(st.get_stealthChop_status() ? PSTR("stealthChop") : PSTR("spreadCycle"));
35
+  serialprintPGM(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle"));
36 36
   SERIAL_EOL();
37 37
 }
38 38
 template<typename TMC>

+ 5
- 5
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp Vedi File

@@ -232,19 +232,19 @@ void lv_draw_tmc_step_mode_settings(void) {
232 232
 
233 233
   bool stealth_X = false, stealth_Y = false, stealth_Z = false, stealth_E0 = false, stealth_E1 = false;
234 234
   #if AXIS_HAS_STEALTHCHOP(X)
235
-    stealth_X = stepperX.get_stealthChop_status();
235
+    stealth_X = stepperX.get_stealthChop();
236 236
   #endif
237 237
   #if AXIS_HAS_STEALTHCHOP(Y)
238
-    stealth_Y = stepperY.get_stealthChop_status();
238
+    stealth_Y = stepperY.get_stealthChop();
239 239
   #endif
240 240
   #if AXIS_HAS_STEALTHCHOP(Z)
241
-    stealth_Z = stepperZ.get_stealthChop_status();
241
+    stealth_Z = stepperZ.get_stealthChop();
242 242
   #endif
243 243
   #if AXIS_HAS_STEALTHCHOP(E0)
244
-    stealth_E0 = stepperE0.get_stealthChop_status();
244
+    stealth_E0 = stepperE0.get_stealthChop();
245 245
   #endif
246 246
   #if AXIS_HAS_STEALTHCHOP(E1)
247
-    stealth_E1 = stepperE1.get_stealthChop_status();
247
+    stealth_E1 = stepperE1.get_stealthChop();
248 248
   #endif
249 249
 
250 250
   if (uiCfg.para_ui_page != 1) {

+ 32
- 32
Marlin/src/module/settings.cpp Vedi File

@@ -1214,60 +1214,60 @@ void MarlinSettings::postprocess() {
1214 1214
 
1215 1215
       #if HAS_STEALTHCHOP
1216 1216
         #if AXIS_HAS_STEALTHCHOP(X)
1217
-          tmc_stealth_enabled.X = stepperX.get_stored_stealthChop_status();
1217
+          tmc_stealth_enabled.X = stepperX.get_stored_stealthChop();
1218 1218
         #endif
1219 1219
         #if AXIS_HAS_STEALTHCHOP(Y)
1220
-          tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop_status();
1220
+          tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop();
1221 1221
         #endif
1222 1222
         #if AXIS_HAS_STEALTHCHOP(Z)
1223
-          tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop_status();
1223
+          tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop();
1224 1224
         #endif
1225 1225
         #if AXIS_HAS_STEALTHCHOP(X2)
1226
-          tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop_status();
1226
+          tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop();
1227 1227
         #endif
1228 1228
         #if AXIS_HAS_STEALTHCHOP(Y2)
1229
-          tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop_status();
1229
+          tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop();
1230 1230
         #endif
1231 1231
         #if AXIS_HAS_STEALTHCHOP(Z2)
1232
-          tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop_status();
1232
+          tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop();
1233 1233
         #endif
1234 1234
         #if AXIS_HAS_STEALTHCHOP(Z3)
1235
-          tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop_status();
1235
+          tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop();
1236 1236
         #endif
1237 1237
         #if AXIS_HAS_STEALTHCHOP(Z4)
1238
-          tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop_status();
1238
+          tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop();
1239 1239
         #endif
1240 1240
         #if MAX_EXTRUDERS
1241 1241
           #if AXIS_HAS_STEALTHCHOP(E0)
1242
-            tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop_status();
1242
+            tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop();
1243 1243
           #endif
1244 1244
           #if MAX_EXTRUDERS > 1
1245 1245
             #if AXIS_HAS_STEALTHCHOP(E1)
1246
-              tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop_status();
1246
+              tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop();
1247 1247
             #endif
1248 1248
             #if MAX_EXTRUDERS > 2
1249 1249
               #if AXIS_HAS_STEALTHCHOP(E2)
1250
-                tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop_status();
1250
+                tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop();
1251 1251
               #endif
1252 1252
               #if MAX_EXTRUDERS > 3
1253 1253
                 #if AXIS_HAS_STEALTHCHOP(E3)
1254
-                  tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop_status();
1254
+                  tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop();
1255 1255
                 #endif
1256 1256
                 #if MAX_EXTRUDERS > 4
1257 1257
                   #if AXIS_HAS_STEALTHCHOP(E4)
1258
-                    tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop_status();
1258
+                    tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop();
1259 1259
                   #endif
1260 1260
                   #if MAX_EXTRUDERS > 5
1261 1261
                     #if AXIS_HAS_STEALTHCHOP(E5)
1262
-                      tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop_status();
1262
+                      tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop();
1263 1263
                     #endif
1264 1264
                     #if MAX_EXTRUDERS > 6
1265 1265
                       #if AXIS_HAS_STEALTHCHOP(E6)
1266
-                        tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop_status();
1266
+                        tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop();
1267 1267
                       #endif
1268 1268
                       #if MAX_EXTRUDERS > 7
1269 1269
                         #if AXIS_HAS_STEALTHCHOP(E7)
1270
-                          tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop_status();
1270
+                          tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop();
1271 1271
                         #endif
1272 1272
                       #endif // MAX_EXTRUDERS > 7
1273 1273
                     #endif // MAX_EXTRUDERS > 6
@@ -3671,17 +3671,17 @@ void MarlinSettings::reset() {
3671 3671
       #if HAS_STEALTHCHOP
3672 3672
         CONFIG_ECHO_HEADING("Driver stepping mode:");
3673 3673
         #if AXIS_HAS_STEALTHCHOP(X)
3674
-          const bool chop_x = stepperX.get_stored_stealthChop_status();
3674
+          const bool chop_x = stepperX.get_stored_stealthChop();
3675 3675
         #else
3676 3676
           constexpr bool chop_x = false;
3677 3677
         #endif
3678 3678
         #if AXIS_HAS_STEALTHCHOP(Y)
3679
-          const bool chop_y = stepperY.get_stored_stealthChop_status();
3679
+          const bool chop_y = stepperY.get_stored_stealthChop();
3680 3680
         #else
3681 3681
           constexpr bool chop_y = false;
3682 3682
         #endif
3683 3683
         #if AXIS_HAS_STEALTHCHOP(Z)
3684
-          const bool chop_z = stepperZ.get_stored_stealthChop_status();
3684
+          const bool chop_z = stepperZ.get_stored_stealthChop();
3685 3685
         #else
3686 3686
           constexpr bool chop_z = false;
3687 3687
         #endif
@@ -3695,17 +3695,17 @@ void MarlinSettings::reset() {
3695 3695
         }
3696 3696
 
3697 3697
         #if AXIS_HAS_STEALTHCHOP(X2)
3698
-          const bool chop_x2 = stepperX2.get_stored_stealthChop_status();
3698
+          const bool chop_x2 = stepperX2.get_stored_stealthChop();
3699 3699
         #else
3700 3700
           constexpr bool chop_x2 = false;
3701 3701
         #endif
3702 3702
         #if AXIS_HAS_STEALTHCHOP(Y2)
3703
-          const bool chop_y2 = stepperY2.get_stored_stealthChop_status();
3703
+          const bool chop_y2 = stepperY2.get_stored_stealthChop();
3704 3704
         #else
3705 3705
           constexpr bool chop_y2 = false;
3706 3706
         #endif
3707 3707
         #if AXIS_HAS_STEALTHCHOP(Z2)
3708
-          const bool chop_z2 = stepperZ2.get_stored_stealthChop_status();
3708
+          const bool chop_z2 = stepperZ2.get_stored_stealthChop();
3709 3709
         #else
3710 3710
           constexpr bool chop_z2 = false;
3711 3711
         #endif
@@ -3719,36 +3719,36 @@ void MarlinSettings::reset() {
3719 3719
         }
3720 3720
 
3721 3721
         #if AXIS_HAS_STEALTHCHOP(Z3)
3722
-          if (stepperZ3.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("I2 Z"), true); }
3722
+          if (stepperZ3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I2 Z"), true); }
3723 3723
         #endif
3724 3724
 
3725 3725
         #if AXIS_HAS_STEALTHCHOP(Z4)
3726
-          if (stepperZ4.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("I3 Z"), true); }
3726
+          if (stepperZ4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I3 Z"), true); }
3727 3727
         #endif
3728 3728
 
3729 3729
         #if AXIS_HAS_STEALTHCHOP(E0)
3730
-          if (stepperE0.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T0 E"), true); }
3730
+          if (stepperE0.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T0 E"), true); }
3731 3731
         #endif
3732 3732
         #if AXIS_HAS_STEALTHCHOP(E1)
3733
-          if (stepperE1.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T1 E"), true); }
3733
+          if (stepperE1.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T1 E"), true); }
3734 3734
         #endif
3735 3735
         #if AXIS_HAS_STEALTHCHOP(E2)
3736
-          if (stepperE2.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T2 E"), true); }
3736
+          if (stepperE2.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T2 E"), true); }
3737 3737
         #endif
3738 3738
         #if AXIS_HAS_STEALTHCHOP(E3)
3739
-          if (stepperE3.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T3 E"), true); }
3739
+          if (stepperE3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T3 E"), true); }
3740 3740
         #endif
3741 3741
         #if AXIS_HAS_STEALTHCHOP(E4)
3742
-          if (stepperE4.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T4 E"), true); }
3742
+          if (stepperE4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T4 E"), true); }
3743 3743
         #endif
3744 3744
         #if AXIS_HAS_STEALTHCHOP(E5)
3745
-          if (stepperE5.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T5 E"), true); }
3745
+          if (stepperE5.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T5 E"), true); }
3746 3746
         #endif
3747 3747
         #if AXIS_HAS_STEALTHCHOP(E6)
3748
-          if (stepperE6.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T6 E"), true); }
3748
+          if (stepperE6.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T6 E"), true); }
3749 3749
         #endif
3750 3750
         #if AXIS_HAS_STEALTHCHOP(E7)
3751
-          if (stepperE7.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T7 E"), true); }
3751
+          if (stepperE7.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T7 E"), true); }
3752 3752
         #endif
3753 3753
 
3754 3754
       #endif // HAS_STEALTHCHOP

Loading…
Annulla
Salva