From 29dcb1cad356e1b2e43647591d84cd748023bfaa Mon Sep 17 00:00:00 2001 From: leptun Date: Sat, 10 Aug 2019 08:43:07 +0300 Subject: [PATCH] Toggle FANS_CHECK --- Firmware/messages.c | 4 ++-- Firmware/messages.h | 4 ++-- Firmware/ultralcd.cpp | 10 ++-------- lang/lang_en.txt | 12 ++++++------ lang/lang_en_cz.txt | 18 +++++++++--------- lang/lang_en_de.txt | 18 +++++++++--------- lang/lang_en_es.txt | 18 +++++++++--------- lang/lang_en_fr.txt | 16 ++++++++-------- lang/lang_en_it.txt | 16 ++++++++-------- lang/lang_en_pl.txt | 18 +++++++++--------- 10 files changed, 64 insertions(+), 70 deletions(-) diff --git a/Firmware/messages.c b/Firmware/messages.c index 1c36e43c..4c1dbc27 100644 --- a/Firmware/messages.c +++ b/Firmware/messages.c @@ -104,13 +104,13 @@ const char MSG_WIZARD_QUIT[] PROGMEM_I1 = ISTR("You can always resume the Wizard const char MSG_YES[] PROGMEM_I1 = ISTR("Yes"); //// const char MSG_V2_CALIBRATION[] PROGMEM_I1 = ISTR("First layer cal."); ////c=17 r=1 const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20 +const char MSG_OFF[] PROGMEM_I1 = "Off"; ////c=3 r=1 +const char MSG_ON[] PROGMEM_I1 = "On"; ////c=2 r=1 //not internationalized messages const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; //// const char MSG_BROWNOUT_RESET[] PROGMEM_N1 = " Brown out Reset"; //// const char MSG_EXTERNAL_RESET[] PROGMEM_N1 = " External Reset"; //// const char MSG_FILE_SAVED[] PROGMEM_N1 = "Done saving file."; //// -const char MSG_OFF[] PROGMEM_N1 = "Off"; //// -const char MSG_ON[] PROGMEM_N1 = "On "; //// const char MSG_POSITION_UNKNOWN[] PROGMEM_N1 = "Home X/Y before Z"; //// const char MSG_SOFTWARE_RESET[] PROGMEM_N1 = " Software Reset"; //// const char MSG_UNKNOWN_COMMAND[] PROGMEM_N1 = "Unknown command: \""; //// diff --git a/Firmware/messages.h b/Firmware/messages.h index b48337ef..65ddbab3 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -104,12 +104,12 @@ extern const char MSG_WIZARD_QUIT[]; extern const char MSG_YES[]; extern const char MSG_V2_CALIBRATION[]; extern const char WELCOME_MSG[]; +extern const char MSG_OFF[]; +extern const char MSG_ON[]; //not internationalized messages extern const char MSG_BROWNOUT_RESET[]; extern const char MSG_EXTERNAL_RESET[]; extern const char MSG_FILE_SAVED[]; -extern const char MSG_OFF[]; -extern const char MSG_ON[]; extern const char MSG_POSITION_UNKNOWN[]; extern const char MSG_SOFTWARE_RESET[]; extern const char MSG_UNKNOWN_COMMAND[]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index ac8a302f..cf81908d 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5569,10 +5569,7 @@ static void lcd_settings_menu() SETTINGS_CUTTER; - if (fans_check_enabled == true) - MENU_ITEM_FUNCTION_P(_i("Fans check [on]"), lcd_set_fan_check);////MSG_FANS_CHECK_ON c=17 r=1 - else - MENU_ITEM_FUNCTION_P(_i("Fans check [off]"), lcd_set_fan_check);////MSG_FANS_CHECK_OFF c=17 r=1 + MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check); SETTINGS_SILENT_MODE; @@ -6881,10 +6878,7 @@ static void lcd_tune_menu() if(farm_mode) { - if (fans_check_enabled == true) - MENU_ITEM_FUNCTION_P(_i("Fans check [on]"), lcd_set_fan_check);////MSG_FANS_CHECK_ON c=17 r=1 - else - MENU_ITEM_FUNCTION_P(_i("Fans check [off]"), lcd_set_fan_check);////MSG_FANS_CHECK_OFF c=17 r=1 + MENU_ITEM_TOGGLE_P(_i("Fans check"), fans_check_enabled ? _T(MSG_ON) : _T(MSG_OFF), lcd_set_fan_check); } #ifdef TMC2130 diff --git a/lang/lang_en.txt b/lang/lang_en.txt index 2da37fc0..8819d40a 100755 --- a/lang/lang_en.txt +++ b/lang/lang_en.txt @@ -220,11 +220,8 @@ #MSG_SELFTEST_FAN c=20 "Fan test" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" +#MSG_FANS_CHECK +"Fans check" #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -929,4 +926,7 @@ "Y-correct:" #MSG_OFF -" [off]" +"Off" + +#MSG_ON +"On" diff --git a/lang/lang_en_cz.txt b/lang/lang_en_cz.txt index ed682e81..9a4b7579 100755 --- a/lang/lang_en_cz.txt +++ b/lang/lang_en_cz.txt @@ -294,13 +294,9 @@ "Fan test" "Test ventilatoru" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Kontr. vent.[zap]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Kontr. vent.[vyp]" +#MSG_FANS_CHECK +"Fans check" +"Kontr. vent." #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1239,5 +1235,9 @@ "Korekce Y:" #MSG_OFF -" [off]" -"\x00" +"Off" +"Vyp" + +#MSG_ON +"On" +"Zap" diff --git a/lang/lang_en_de.txt b/lang/lang_en_de.txt index cb73f8f2..1dc09798 100755 --- a/lang/lang_en_de.txt +++ b/lang/lang_en_de.txt @@ -294,13 +294,9 @@ "Fan test" "Lueftertest" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Luefter Chk. [an]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Luefter Chk.[aus]" +#MSG_FANS_CHECK +"Fans check" +"Luefter Chk." #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1240,5 +1236,9 @@ "Y-Korrektur:" #MSG_OFF -" [off]" -"\x00" +"Off" +"Aus" + +#MSG_ON +"On" +"An" diff --git a/lang/lang_en_es.txt b/lang/lang_en_es.txt index a48da96f..ba1fea1e 100755 --- a/lang/lang_en_es.txt +++ b/lang/lang_en_es.txt @@ -294,13 +294,9 @@ "Fan test" "Test ventiladores" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Comprob.vent[act]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Comprob.vent[ina]" +#MSG_FANS_CHECK +"Fans check" +"Comprob.vent" #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1239,5 +1235,9 @@ "Y-correcion:" #MSG_OFF -" [off]" -"\x00" +"Off" +"Ina" + +#MSG_ON +"On" +"Act" diff --git a/lang/lang_en_fr.txt b/lang/lang_en_fr.txt index 320b91d9..f86795d7 100755 --- a/lang/lang_en_fr.txt +++ b/lang/lang_en_fr.txt @@ -294,13 +294,9 @@ "Fan test" "Test ventilateur" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Verif ventilo[on]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Verif venti [off]" +#MSG_FANS_CHECK +"Fans check" +"Verif ventilo" #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1239,5 +1235,9 @@ "Correct-Y:" #MSG_OFF -" [off]" +"Off" +"\x00" + +#MSG_ON +"On" "\x00" diff --git a/lang/lang_en_it.txt b/lang/lang_en_it.txt index 0b82c587..4130aedb 100755 --- a/lang/lang_en_it.txt +++ b/lang/lang_en_it.txt @@ -294,13 +294,9 @@ "Fan test" "Test ventola" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Controllo ventole [on]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Control.vent[off]" +#MSG_FANS_CHECK +"Fans check" +"Control.vent" #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1239,5 +1235,9 @@ "Correzione-Y:" #MSG_OFF -" [off]" +"Off" +"\x00" + +#MSG_ON +"On" "\x00" diff --git a/lang/lang_en_pl.txt b/lang/lang_en_pl.txt index 47e0fbb0..45b402fa 100755 --- a/lang/lang_en_pl.txt +++ b/lang/lang_en_pl.txt @@ -294,13 +294,9 @@ "Fan test" "Test wentylatora" -#MSG_FANS_CHECK_ON c=17 r=1 -"Fans check [on]" -"Sprawd.went. [wl]" - -#MSG_FANS_CHECK_OFF c=17 r=1 -"Fans check [off]" -"Sprawd.went.[wyl]" +#MSG_FANS_CHECK +"Fans check" +"Sprawd.went." #MSG_FSENSOR_ON "Fil. sensor [on]" @@ -1239,5 +1235,9 @@ "Korekcja Y:" #MSG_OFF -" [off]" -"\x00" +"Off" +"Wyl" + +#MSG_ON +"On" +"Wl"