From b1b2ecba6cca8275f7c813582e7da6d67a02a7ba Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 22 Oct 2020 20:54:11 -0500 Subject: [PATCH] Shorten a method name --- Marlin/src/feature/tmc_util.h | 12 ++-- Marlin/src/gcode/feature/trinamic/M569.cpp | 2 +- .../mks_ui/draw_tmc_step_mode_settings.cpp | 10 +-- Marlin/src/module/settings.cpp | 64 +++++++++---------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Marlin/src/feature/tmc_util.h b/Marlin/src/feature/tmc_util.h index 187cfda483..abde342307 100644 --- a/Marlin/src/feature/tmc_util.h +++ b/Marlin/src/feature/tmc_util.h @@ -104,8 +104,8 @@ class TMCMarlin : public TMC, public TMCStorage { #if HAS_STEALTHCHOP inline void refresh_stepping_mode() { this->en_pwm_mode(this->stored.stealthChop_enabled); } - inline bool get_stealthChop_status() { return this->en_pwm_mode(); } - inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; } + inline bool get_stealthChop() { return this->en_pwm_mode(); } + inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; } #endif #if ENABLED(HYBRID_THRESHOLD) @@ -171,8 +171,8 @@ class TMCMarlin : public TMC220 #if HAS_STEALTHCHOP inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); } - inline bool get_stealthChop_status() { return !this->en_spreadCycle(); } - inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; } + inline bool get_stealthChop() { return !this->en_spreadCycle(); } + inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; } #endif #if ENABLED(HYBRID_THRESHOLD) @@ -217,8 +217,8 @@ class TMCMarlin : public TMC220 #if HAS_STEALTHCHOP inline void refresh_stepping_mode() { en_spreadCycle(!this->stored.stealthChop_enabled); } - inline bool get_stealthChop_status() { return !this->en_spreadCycle(); } - inline bool get_stored_stealthChop_status() { return this->stored.stealthChop_enabled; } + inline bool get_stealthChop() { return !this->en_spreadCycle(); } + inline bool get_stored_stealthChop() { return this->stored.stealthChop_enabled; } #endif #if ENABLED(HYBRID_THRESHOLD) diff --git a/Marlin/src/gcode/feature/trinamic/M569.cpp b/Marlin/src/gcode/feature/trinamic/M569.cpp index e72d03e767..6b379f1190 100644 --- a/Marlin/src/gcode/feature/trinamic/M569.cpp +++ b/Marlin/src/gcode/feature/trinamic/M569.cpp @@ -32,7 +32,7 @@ template void tmc_say_stealth_status(TMC &st) { st.printLabel(); SERIAL_ECHOPGM(" driver mode:\t"); - serialprintPGM(st.get_stealthChop_status() ? PSTR("stealthChop") : PSTR("spreadCycle")); + serialprintPGM(st.get_stealthChop() ? PSTR("stealthChop") : PSTR("spreadCycle")); SERIAL_EOL(); } template diff --git a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp b/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp index 8be03297f5..2140af0793 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp +++ b/Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.cpp @@ -232,19 +232,19 @@ void lv_draw_tmc_step_mode_settings(void) { bool stealth_X = false, stealth_Y = false, stealth_Z = false, stealth_E0 = false, stealth_E1 = false; #if AXIS_HAS_STEALTHCHOP(X) - stealth_X = stepperX.get_stealthChop_status(); + stealth_X = stepperX.get_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Y) - stealth_Y = stepperY.get_stealthChop_status(); + stealth_Y = stepperY.get_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Z) - stealth_Z = stepperZ.get_stealthChop_status(); + stealth_Z = stepperZ.get_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(E0) - stealth_E0 = stepperE0.get_stealthChop_status(); + stealth_E0 = stepperE0.get_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(E1) - stealth_E1 = stepperE1.get_stealthChop_status(); + stealth_E1 = stepperE1.get_stealthChop(); #endif if (uiCfg.para_ui_page != 1) { diff --git a/Marlin/src/module/settings.cpp b/Marlin/src/module/settings.cpp index 9ed78efd63..972d375848 100644 --- a/Marlin/src/module/settings.cpp +++ b/Marlin/src/module/settings.cpp @@ -1214,60 +1214,60 @@ void MarlinSettings::postprocess() { #if HAS_STEALTHCHOP #if AXIS_HAS_STEALTHCHOP(X) - tmc_stealth_enabled.X = stepperX.get_stored_stealthChop_status(); + tmc_stealth_enabled.X = stepperX.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Y) - tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop_status(); + tmc_stealth_enabled.Y = stepperY.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Z) - tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop_status(); + tmc_stealth_enabled.Z = stepperZ.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(X2) - tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop_status(); + tmc_stealth_enabled.X2 = stepperX2.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Y2) - tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop_status(); + tmc_stealth_enabled.Y2 = stepperY2.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Z2) - tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop_status(); + tmc_stealth_enabled.Z2 = stepperZ2.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Z3) - tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop_status(); + tmc_stealth_enabled.Z3 = stepperZ3.get_stored_stealthChop(); #endif #if AXIS_HAS_STEALTHCHOP(Z4) - tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop_status(); + tmc_stealth_enabled.Z4 = stepperZ4.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS #if AXIS_HAS_STEALTHCHOP(E0) - tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop_status(); + tmc_stealth_enabled.E0 = stepperE0.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 1 #if AXIS_HAS_STEALTHCHOP(E1) - tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop_status(); + tmc_stealth_enabled.E1 = stepperE1.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 2 #if AXIS_HAS_STEALTHCHOP(E2) - tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop_status(); + tmc_stealth_enabled.E2 = stepperE2.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 3 #if AXIS_HAS_STEALTHCHOP(E3) - tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop_status(); + tmc_stealth_enabled.E3 = stepperE3.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 4 #if AXIS_HAS_STEALTHCHOP(E4) - tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop_status(); + tmc_stealth_enabled.E4 = stepperE4.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 5 #if AXIS_HAS_STEALTHCHOP(E5) - tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop_status(); + tmc_stealth_enabled.E5 = stepperE5.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 6 #if AXIS_HAS_STEALTHCHOP(E6) - tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop_status(); + tmc_stealth_enabled.E6 = stepperE6.get_stored_stealthChop(); #endif #if MAX_EXTRUDERS > 7 #if AXIS_HAS_STEALTHCHOP(E7) - tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop_status(); + tmc_stealth_enabled.E7 = stepperE7.get_stored_stealthChop(); #endif #endif // MAX_EXTRUDERS > 7 #endif // MAX_EXTRUDERS > 6 @@ -3671,17 +3671,17 @@ void MarlinSettings::reset() { #if HAS_STEALTHCHOP CONFIG_ECHO_HEADING("Driver stepping mode:"); #if AXIS_HAS_STEALTHCHOP(X) - const bool chop_x = stepperX.get_stored_stealthChop_status(); + const bool chop_x = stepperX.get_stored_stealthChop(); #else constexpr bool chop_x = false; #endif #if AXIS_HAS_STEALTHCHOP(Y) - const bool chop_y = stepperY.get_stored_stealthChop_status(); + const bool chop_y = stepperY.get_stored_stealthChop(); #else constexpr bool chop_y = false; #endif #if AXIS_HAS_STEALTHCHOP(Z) - const bool chop_z = stepperZ.get_stored_stealthChop_status(); + const bool chop_z = stepperZ.get_stored_stealthChop(); #else constexpr bool chop_z = false; #endif @@ -3695,17 +3695,17 @@ void MarlinSettings::reset() { } #if AXIS_HAS_STEALTHCHOP(X2) - const bool chop_x2 = stepperX2.get_stored_stealthChop_status(); + const bool chop_x2 = stepperX2.get_stored_stealthChop(); #else constexpr bool chop_x2 = false; #endif #if AXIS_HAS_STEALTHCHOP(Y2) - const bool chop_y2 = stepperY2.get_stored_stealthChop_status(); + const bool chop_y2 = stepperY2.get_stored_stealthChop(); #else constexpr bool chop_y2 = false; #endif #if AXIS_HAS_STEALTHCHOP(Z2) - const bool chop_z2 = stepperZ2.get_stored_stealthChop_status(); + const bool chop_z2 = stepperZ2.get_stored_stealthChop(); #else constexpr bool chop_z2 = false; #endif @@ -3719,36 +3719,36 @@ void MarlinSettings::reset() { } #if AXIS_HAS_STEALTHCHOP(Z3) - if (stepperZ3.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("I2 Z"), true); } + if (stepperZ3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I2 Z"), true); } #endif #if AXIS_HAS_STEALTHCHOP(Z4) - if (stepperZ4.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("I3 Z"), true); } + if (stepperZ4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("I3 Z"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E0) - if (stepperE0.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T0 E"), true); } + if (stepperE0.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T0 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E1) - if (stepperE1.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T1 E"), true); } + if (stepperE1.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T1 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E2) - if (stepperE2.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T2 E"), true); } + if (stepperE2.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T2 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E3) - if (stepperE3.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T3 E"), true); } + if (stepperE3.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T3 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E4) - if (stepperE4.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T4 E"), true); } + if (stepperE4.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T4 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E5) - if (stepperE5.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T5 E"), true); } + if (stepperE5.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T5 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E6) - if (stepperE6.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T6 E"), true); } + if (stepperE6.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T6 E"), true); } #endif #if AXIS_HAS_STEALTHCHOP(E7) - if (stepperE7.get_stored_stealthChop_status()) { say_M569(forReplay, PSTR("T7 E"), true); } + if (stepperE7.get_stored_stealthChop()) { say_M569(forReplay, PSTR("T7 E"), true); } #endif #endif // HAS_STEALTHCHOP