From 7f51e0bad826b6207f4c6b224df1a5f65d8629a0 Mon Sep 17 00:00:00 2001 From: leptun Date: Thu, 29 Aug 2019 17:35:26 +0300 Subject: [PATCH] Move SpoolJoin and Cutter to MSGs --- Firmware/messages.c | 2 ++ Firmware/messages.h | 2 ++ Firmware/ultralcd.cpp | 12 ++++++------ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Firmware/messages.c b/Firmware/messages.c index 4c1508c3..5eac34a0 100644 --- a/Firmware/messages.c +++ b/Firmware/messages.c @@ -106,6 +106,8 @@ const char WELCOME_MSG[] PROGMEM_I1 = ISTR(CUSTOM_MENDEL_NAME " OK."); ////c=20 const char MSG_OFF[] PROGMEM_I1 = ISTR("Off"); //// const char MSG_ON[] PROGMEM_I1 = ISTR("On"); //// const char MSG_NA[] PROGMEM_I1 = ISTR("N/A"); //// +const char MSG_AUTO_DEPLETE[] PROGMEM_I1 = ISTR("SpoolJoin"); //// +const char MSG_CUTTER[] PROGMEM_I1 = ISTR("Cutter"); //// //not internationalized messages const char MSG_SD_WORKDIR_FAIL[] PROGMEM_N1 = "workDir open failed"; //// diff --git a/Firmware/messages.h b/Firmware/messages.h index d584324a..10d14074 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -106,6 +106,8 @@ extern const char WELCOME_MSG[]; extern const char MSG_OFF[]; extern const char MSG_ON[]; extern const char MSG_NA[]; +extern const char MSG_AUTO_DEPLETE[]; +extern const char MSG_CUTTER[]; //not internationalized messages extern const char MSG_BROWNOUT_RESET[]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 800a7298..713f590c 100755 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5112,15 +5112,15 @@ static void settingsAutoDeplete() { if (!fsensor_enabled) { - MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_NA), NULL); + MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), _T(MSG_NA), NULL); } else if (lcd_autoDeplete) { - MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_ON), auto_deplete_switch); + MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), _T(MSG_ON), auto_deplete_switch); } else { - MENU_ITEM_TOGGLE_P(_i("SpoolJoin"), _T(MSG_OFF), auto_deplete_switch); + MENU_ITEM_TOGGLE_P(_T(MSG_AUTO_DEPLETE), _T(MSG_OFF), auto_deplete_switch); } } } @@ -5139,17 +5139,17 @@ static void settingsCutter() { if (EEPROM_MMU_CUTTER_ENABLED_enabled == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED)) { - MENU_ITEM_TOGGLE_P(_i("Cutter"), _T(MSG_ON), lcd_cutter_enabled); + MENU_ITEM_TOGGLE_P(_T(MSG_CUTTER), _T(MSG_ON), lcd_cutter_enabled); } #ifdef MMU_ALWAYS_CUT else if (EEPROM_MMU_CUTTER_ENABLED_always == eeprom_read_byte((uint8_t*)EEPROM_MMU_CUTTER_ENABLED)) { - MENU_ITEM_TOGGLE_P(_i("Cutter"), _i("Always"), lcd_cutter_enabled); + MENU_ITEM_TOGGLE_P(_T(MSG_CUTTER), _i("Always"), lcd_cutter_enabled); } #endif else { - MENU_ITEM_TOGGLE_P(_i("Cutter"), _T(MSG_OFF), lcd_cutter_enabled); + MENU_ITEM_TOGGLE_P(_T(MSG_CUTTER), _T(MSG_OFF), lcd_cutter_enabled); } } }