From 16f28e747bf679ae564c23a7af5c062c5cae7c3a Mon Sep 17 00:00:00 2001 From: ellensp <530024+ellensp@users.noreply.github.com> Date: Tue, 29 Oct 2024 05:20:01 +1300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20SHAPING=5FMENU=20X=20frequ?= =?UTF-8?q?ency=20edit=20(#27499)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/language/language_en.h | 8 ++++---- Marlin/src/lcd/language/language_it.h | 8 ++++---- Marlin/src/lcd/language/language_ru.h | 8 ++++---- Marlin/src/lcd/language/language_sk.h | 8 ++++---- Marlin/src/lcd/language/language_tr.h | 8 ++++---- Marlin/src/lcd/menu/menu_advanced.cpp | 26 +++++++++++++------------- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Marlin/src/lcd/language/language_en.h b/Marlin/src/lcd/language/language_en.h index 29b5a1bed3..71a7a6869d 100644 --- a/Marlin/src/lcd/language/language_en.h +++ b/Marlin/src/lcd/language/language_en.h @@ -449,10 +449,10 @@ namespace LanguageNarrow_en { LSTR MSG_A_RETRACT = _UxGT("Retract Accel"); LSTR MSG_A_TRAVEL = _UxGT("Travel Accel"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Enable @ shaping"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Disable @ shaping"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ frequency"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ damping"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Enable @ shaping"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Disable @ shaping"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ frequency"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ damping"); LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frequency"); // ProUI LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frequency"); // ProUI LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frequency"); // ProUI diff --git a/Marlin/src/lcd/language/language_it.h b/Marlin/src/lcd/language/language_it.h index 2244fa3443..005f0b45a4 100644 --- a/Marlin/src/lcd/language/language_it.h +++ b/Marlin/src/lcd/language/language_it.h @@ -424,10 +424,10 @@ namespace LanguageNarrow_it { LSTR MSG_A_RETRACT = _UxGT("A-Ritrazione"); LSTR MSG_A_TRAVEL = _UxGT("A-Spostamento"); LSTR MSG_INPUT_SHAPING = _UxGT("Input shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Abilita shaping @"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Disabil. shaping @"); - LSTR MSG_SHAPING_FREQ = _UxGT("Frequenza @"); - LSTR MSG_SHAPING_ZETA = _UxGT("Smorzamento @"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Abilita shaping @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Disabil. shaping @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("Frequenza @"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("Smorzamento @"); LSTR MSG_SHAPING_A_FREQ = _UxGT("Frequenza ") STR_A; // ProUI LSTR MSG_SHAPING_B_FREQ = _UxGT("Frequenza ") STR_B; // ProUI LSTR MSG_SHAPING_C_FREQ = _UxGT("Frequenza ") STR_C; // ProUI diff --git a/Marlin/src/lcd/language/language_ru.h b/Marlin/src/lcd/language/language_ru.h index aef39952cf..9d6509d70d 100644 --- a/Marlin/src/lcd/language/language_ru.h +++ b/Marlin/src/lcd/language/language_ru.h @@ -721,10 +721,10 @@ namespace LanguageNarrow_ru { LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN = _UxGT("Коэфф.кулера"); LSTR MSG_MPC_AMBIENT_XFER_COEFF_FAN_E = _UxGT("Коэфф.кулер *"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Включить шейпинг @"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Выключить шейпинг @"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ частота"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ подавление"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Включить шейпинг @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Выключить шейпинг @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ частота"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ подавление"); LSTR MSG_FILAMENT_EN = _UxGT("Филамент *"); LSTR MSG_SEGMENTS_PER_SECOND = _UxGT("Сегментов/сек"); LSTR MSG_DRAW_MIN_X = _UxGT("Рисовать мин X"); diff --git a/Marlin/src/lcd/language/language_sk.h b/Marlin/src/lcd/language/language_sk.h index b3a9e3368e..50729dfbd0 100644 --- a/Marlin/src/lcd/language/language_sk.h +++ b/Marlin/src/lcd/language/language_sk.h @@ -392,10 +392,10 @@ namespace LanguageNarrow_sk { LSTR MSG_A_RETRACT = _UxGT("A-retrakt"); LSTR MSG_A_TRAVEL = _UxGT("A-prejazd"); LSTR MSG_INPUT_SHAPING = _UxGT("Tvarov. vstupu"); - LSTR MSG_SHAPING_ENABLE = _UxGT("Povol. tvarov. @"); - LSTR MSG_SHAPING_DISABLE = _UxGT("Zakáz. tvarov. @"); - LSTR MSG_SHAPING_FREQ = _UxGT("Frekvencia @"); - LSTR MSG_SHAPING_ZETA = _UxGT("Tlmenie @"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("Povol. tvarov. @"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("Zakáz. tvarov. @"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("Frekvencia @"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("Tlmenie @"); LSTR MSG_XY_FREQUENCY_LIMIT = _UxGT("Max. frekvencia"); LSTR MSG_XY_FREQUENCY_FEEDRATE = _UxGT("Min. posun"); LSTR MSG_STEPS_PER_MM = _UxGT("Kroky/mm"); diff --git a/Marlin/src/lcd/language/language_tr.h b/Marlin/src/lcd/language/language_tr.h index 830d0adaa4..e22a4c75d0 100644 --- a/Marlin/src/lcd/language/language_tr.h +++ b/Marlin/src/lcd/language/language_tr.h @@ -397,10 +397,10 @@ namespace LanguageNarrow_tr { LSTR MSG_A_RETRACT = _UxGT("G.Çekme Hızı"); LSTR MSG_A_TRAVEL = _UxGT("Gezinme Hızı"); LSTR MSG_INPUT_SHAPING = _UxGT("Input Shaping"); - LSTR MSG_SHAPING_ENABLE = _UxGT("@ Biçimlemeyi Aç"); - LSTR MSG_SHAPING_DISABLE = _UxGT("@ Biçimlemeyi Kapat"); - LSTR MSG_SHAPING_FREQ = _UxGT("@ frekans"); - LSTR MSG_SHAPING_ZETA = _UxGT("@ sönümleme"); + LSTR MSG_SHAPING_ENABLE_N = _UxGT("@ Biçimlemeyi Aç"); + LSTR MSG_SHAPING_DISABLE_N = _UxGT("@ Biçimlemeyi Kapat"); + LSTR MSG_SHAPING_FREQ_N = _UxGT("@ frekans"); + LSTR MSG_SHAPING_ZETA_N = _UxGT("@ sönümleme"); LSTR MSG_SHAPING_A_FREQ = STR_A _UxGT(" frekansı"); // ProUI LSTR MSG_SHAPING_B_FREQ = STR_B _UxGT(" frekansı"); // ProUI LSTR MSG_SHAPING_C_FREQ = STR_C _UxGT(" frekansı"); // ProUI diff --git a/Marlin/src/lcd/menu/menu_advanced.cpp b/Marlin/src/lcd/menu/menu_advanced.cpp index e1072f3ee4..2724b1d54e 100644 --- a/Marlin/src/lcd/menu/menu_advanced.cpp +++ b/Marlin/src/lcd/menu/menu_advanced.cpp @@ -559,20 +559,20 @@ void menu_backlash(); BACK_ITEM(MSG_ADVANCED_SETTINGS); // M593 F Frequency and D Damping ratio - #define SHAPING_MENU_FOR_AXIS(AXIS) \ - editable.decimal = stepper.get_shaping_frequency(AXIS); \ - if (editable.decimal) { \ - ACTION_ITEM_N(AXIS, MSG_SHAPING_DISABLE, []{ stepper.set_shaping_frequency(AXIS, 0.0f); ui.refresh(); }); \ - EDIT_ITEM_FAST_N(float41, AXIS, MSG_SHAPING_FREQ, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(AXIS, editable.decimal); }); \ - editable.decimal = stepper.get_shaping_damping_ratio(AXIS); \ - EDIT_ITEM_FAST_N(float42_52, AXIS, MSG_SHAPING_ZETA, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(AXIS, editable.decimal); }); \ - } \ - else \ - ACTION_ITEM_N(AXIS, MSG_SHAPING_ENABLE, []{ stepper.set_shaping_frequency(AXIS, (SHAPING_FREQ_X) ?: (SHAPING_MIN_FREQ)); ui.refresh(); }); + #define SHAPING_MENU_FOR_AXIS(A) \ + editable.decimal = stepper.get_shaping_frequency(_AXIS(A)); \ + if (editable.decimal) { \ + ACTION_ITEM_N(_AXIS(A), MSG_SHAPING_DISABLE_N, []{ stepper.set_shaping_frequency(_AXIS(A), 0.0f); ui.refresh(); }); \ + EDIT_ITEM_FAST_N(float41, _AXIS(A), MSG_SHAPING_FREQ_N, &editable.decimal, min_frequency, 200.0f, []{ stepper.set_shaping_frequency(_AXIS(A), editable.decimal); }); \ + editable.decimal = stepper.get_shaping_damping_ratio(_AXIS(A)); \ + EDIT_ITEM_FAST_N(float42_52, _AXIS(A), MSG_SHAPING_ZETA_N, &editable.decimal, 0.0f, 1.0f, []{ stepper.set_shaping_damping_ratio(_AXIS(A), editable.decimal); }); \ + } \ + else \ + ACTION_ITEM_N(_AXIS(A), MSG_SHAPING_ENABLE_N, []{ stepper.set_shaping_frequency(_AXIS(A), (SHAPING_FREQ_##A) ?: (SHAPING_MIN_FREQ)); ui.refresh(); }); - TERN_(INPUT_SHAPING_X, SHAPING_MENU_FOR_AXIS(X_AXIS)) - TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y_AXIS)) - TERN_(INPUT_SHAPING_Z, SHAPING_MENU_FOR_AXIS(Z_AXIS)) + TERN_(INPUT_SHAPING_X, SHAPING_MENU_FOR_AXIS(X)) + TERN_(INPUT_SHAPING_Y, SHAPING_MENU_FOR_AXIS(Y)) + TERN_(INPUT_SHAPING_Z, SHAPING_MENU_FOR_AXIS(Z)) END_MENU(); }