1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

🐛 Fix SHAPING_MENU X frequency edit (#27499)

This commit is contained in:
ellensp 2024-10-29 05:20:01 +13:00 committed by GitHub
parent 3b7aadb359
commit 16f28e747b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 33 additions and 33 deletions

View File

@ -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

View File

@ -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

View File

@ -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");

View File

@ -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");

View File

@ -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

View File

@ -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();
}