Move SpoolJoin and Cutter to MSGs

This commit is contained in:
leptun 2019-08-29 17:35:26 +03:00
parent 0b21acec46
commit 7f51e0bad8
3 changed files with 10 additions and 6 deletions

View File

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

View File

@ -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[];

View File

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