Toggle Mode (stepper power)

This commit is contained in:
leptun 2019-08-30 07:59:58 +03:00
parent db6e2e0525
commit b86a92a7d6
10 changed files with 150 additions and 121 deletions

View File

@ -9,7 +9,6 @@
//internationalized messages //internationalized messages
const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); //// const char MSG_AUTO_HOME[] PROGMEM_I1 = ISTR("Auto home"); ////
const char MSG_AUTO_MODE_ON[] PROGMEM_I1 = ISTR("Mode [auto power]"); ////
const char MSG_BABYSTEP_Z[] PROGMEM_I1 = ISTR("Live adjust Z"); //// c=18 const char MSG_BABYSTEP_Z[] PROGMEM_I1 = ISTR("Live adjust Z"); //// c=18
const char MSG_BABYSTEP_Z_NOT_SET[] PROGMEM_I1 = ISTR("Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."); ////c=20 r=12 const char MSG_BABYSTEP_Z_NOT_SET[] PROGMEM_I1 = ISTR("Distance between tip of the nozzle and the bed surface has not been set yet. Please follow the manual, chapter First steps, section First layer calibration."); ////c=20 r=12
const char MSG_BED[] PROGMEM_I1 = ISTR("Bed"); //// const char MSG_BED[] PROGMEM_I1 = ISTR("Bed"); ////
@ -82,10 +81,12 @@ const char MSG_SELFTEST_FILAMENT_SENSOR[] PROGMEM_I1 = ISTR("Filament sensor");
const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); //// const char MSG_SELFTEST_WIRINGERROR[] PROGMEM_I1 = ISTR("Wiring error"); ////
const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); //// const char MSG_SETTINGS[] PROGMEM_I1 = ISTR("Settings"); ////
const char MSG_HW_SETUP[] PROGMEM_I1 = ISTR("HW Setup"); //// const char MSG_HW_SETUP[] PROGMEM_I1 = ISTR("HW Setup"); ////
const char MSG_SILENT_MODE_OFF[] PROGMEM_I1 = ISTR("Mode [high power]"); //// const char MSG_MODE[] PROGMEM_I1 = ISTR("Mode"); ////
const char MSG_SILENT_MODE_ON[] PROGMEM_I1 = ISTR("Mode [silent]"); //// const char MSG_HIGH_POWER[] PROGMEM_I1 = ISTR("High power"); ////
const char MSG_STEALTH_MODE_OFF[] PROGMEM_I1 = ISTR("Mode [Normal]"); //// const char MSG_AUTO_POWER[] PROGMEM_I1 = ISTR("Auto power"); ////
const char MSG_STEALTH_MODE_ON[] PROGMEM_I1 = ISTR("Mode [Stealth]"); //// const char MSG_SILENT[] PROGMEM_I1 = ISTR("Silent"); ////
const char MSG_NORMAL[] PROGMEM_I1 = ISTR("Normal"); ////
const char MSG_STEALTH[] PROGMEM_I1 = ISTR("Stealth"); ////
const char MSG_STEEL_SHEET_CHECK[] PROGMEM_I1 = ISTR("Is steel sheet on heatbed?"); ////c=20 r=2 const char MSG_STEEL_SHEET_CHECK[] PROGMEM_I1 = ISTR("Is steel sheet on heatbed?"); ////c=20 r=2
const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); //// const char MSG_STOP_PRINT[] PROGMEM_I1 = ISTR("Stop print"); ////
const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED. "); //// const char MSG_STOPPED[] PROGMEM_I1 = ISTR("STOPPED. "); ////

View File

@ -10,7 +10,6 @@ extern "C" {
// LCD Menu Messages // LCD Menu Messages
//internationalized messages //internationalized messages
extern const char MSG_AUTO_HOME[]; extern const char MSG_AUTO_HOME[];
extern const char MSG_AUTO_MODE_ON[];
extern const char MSG_BABYSTEP_Z[]; extern const char MSG_BABYSTEP_Z[];
extern const char MSG_BABYSTEP_Z_NOT_SET[]; extern const char MSG_BABYSTEP_Z_NOT_SET[];
extern const char MSG_BED[]; extern const char MSG_BED[];
@ -82,10 +81,12 @@ extern const char MSG_SELFTEST_FILAMENT_SENSOR[];
extern const char MSG_SELFTEST_WIRINGERROR[]; extern const char MSG_SELFTEST_WIRINGERROR[];
extern const char MSG_SETTINGS[]; extern const char MSG_SETTINGS[];
extern const char MSG_HW_SETUP[]; extern const char MSG_HW_SETUP[];
extern const char MSG_SILENT_MODE_OFF[]; extern const char MSG_MODE[];
extern const char MSG_SILENT_MODE_ON[]; extern const char MSG_HIGH_POWER[];
extern const char MSG_STEALTH_MODE_OFF[]; extern const char MSG_AUTO_POWER[];
extern const char MSG_STEALTH_MODE_ON[]; extern const char MSG_SILENT[];
extern const char MSG_NORMAL[];
extern const char MSG_STEALTH[];
extern const char MSG_STEEL_SHEET_CHECK[]; extern const char MSG_STEEL_SHEET_CHECK[];
extern const char MSG_STOP_PRINT[]; extern const char MSG_STOP_PRINT[];
extern const char MSG_STOPPED[]; extern const char MSG_STOPPED[];

View File

@ -5172,9 +5172,9 @@ do\
{\ {\
if (SilentModeMenu == SILENT_MODE_NORMAL)\ if (SilentModeMenu == SILENT_MODE_NORMAL)\
{\ {\
MENU_ITEM_FUNCTION_P(_T(MSG_STEALTH_MODE_OFF), lcd_silent_mode_set);\ MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_NORMAL), lcd_silent_mode_set);\
}\ }\
else MENU_ITEM_FUNCTION_P(_T(MSG_STEALTH_MODE_ON), lcd_silent_mode_set);\ else MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_STEALTH), lcd_silent_mode_set);\
if (SilentModeMenu == SILENT_MODE_NORMAL)\ if (SilentModeMenu == SILENT_MODE_NORMAL)\
{\ {\
if (lcd_crash_detect_enabled()) MENU_ITEM_TOGGLE_P(_T(MSG_CRASHDETECT), _T(MSG_ON), crash_mode_switch);\ if (lcd_crash_detect_enabled()) MENU_ITEM_TOGGLE_P(_T(MSG_CRASHDETECT), _T(MSG_ON), crash_mode_switch);\
@ -5194,16 +5194,16 @@ do\
switch (SilentModeMenu)\ switch (SilentModeMenu)\
{\ {\
case SILENT_MODE_POWER:\ case SILENT_MODE_POWER:\
MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_OFF), lcd_silent_mode_set);\ MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_HIGH_POWER), lcd_silent_mode_set);\
break;\ break;\
case SILENT_MODE_SILENT:\ case SILENT_MODE_SILENT:\
MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_ON), lcd_silent_mode_set);\ MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_SILENT), lcd_silent_mode_set);\
break;\ break;\
case SILENT_MODE_AUTO:\ case SILENT_MODE_AUTO:\
MENU_ITEM_FUNCTION_P(_T(MSG_AUTO_MODE_ON), lcd_silent_mode_set);\ MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_AUTO_POWER), lcd_silent_mode_set);\
break;\ break;\
default:\ default:\
MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_OFF), lcd_silent_mode_set);\ MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_HIGH_POWER), lcd_silent_mode_set);\
break; /* (probably) not needed*/\ break; /* (probably) not needed*/\
}\ }\
}\ }\
@ -6887,8 +6887,8 @@ static void lcd_tune_menu()
#ifdef TMC2130 #ifdef TMC2130
if(!farm_mode) if(!farm_mode)
{ {
if (SilentModeMenu == SILENT_MODE_NORMAL) MENU_ITEM_FUNCTION_P(_T(MSG_STEALTH_MODE_OFF), lcd_silent_mode_set); if (SilentModeMenu == SILENT_MODE_NORMAL) MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_NORMAL), lcd_silent_mode_set);
else MENU_ITEM_FUNCTION_P(_T(MSG_STEALTH_MODE_ON), lcd_silent_mode_set); else MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_STEALTH), lcd_silent_mode_set);
if (SilentModeMenu == SILENT_MODE_NORMAL) if (SilentModeMenu == SILENT_MODE_NORMAL)
{ {
@ -6900,10 +6900,10 @@ static void lcd_tune_menu()
#else //TMC2130 #else //TMC2130
if (!farm_mode) { //dont show in menu if we are in farm mode if (!farm_mode) { //dont show in menu if we are in farm mode
switch (SilentModeMenu) { switch (SilentModeMenu) {
case SILENT_MODE_POWER: MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_OFF), lcd_silent_mode_set); break; case SILENT_MODE_POWER: MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_HIGH_POWER), lcd_silent_mode_set); break;
case SILENT_MODE_SILENT: MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_ON), lcd_silent_mode_set); break; case SILENT_MODE_SILENT: MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_SILENT), lcd_silent_mode_set); break;
case SILENT_MODE_AUTO: MENU_ITEM_FUNCTION_P(_T(MSG_AUTO_MODE_ON), lcd_silent_mode_set); break; case SILENT_MODE_AUTO: MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_AUTO_POWER), lcd_silent_mode_set); break;
default: MENU_ITEM_FUNCTION_P(_T(MSG_SILENT_MODE_OFF), lcd_silent_mode_set); break; // (probably) not needed default: MENU_ITEM_TOGGLE_P(_T(MSG_MODE), _T(MSG_HIGH_POWER), lcd_silent_mode_set); break; // (probably) not needed
} }
} }
#endif //TMC2130 #endif //TMC2130

View File

@ -412,11 +412,14 @@
#MSG_MMU_OK_RESUMING c=20 r=4 #MSG_MMU_OK_RESUMING c=20 r=4
"MMU OK. Resuming..." "MMU OK. Resuming..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
#MSG_SILENT
"Silent"
# #
"MMU needs user attention." "MMU needs user attention."
@ -424,14 +427,14 @@
# #
"MMU power fails" "MMU power fails"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Pokracuji..." "MMU OK. Pokracuji..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"Mod [Normal]" "Mod"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Mod [tichy]" "\x00"
#MSG_SILENT
"Silent"
"Tichy"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"MMU vypadky proudu" "MMU vypadky proudu"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Mod [tichy]" "Tichy"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Mod [automaticky]" "Automaticky"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Mod [vys. vykon]" "Vys. vykon"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Weiterdrucken..." "MMU OK. Weiterdrucken..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"Modus [Normal]" "Modus"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Modus [leise]" "\x00"
#MSG_SILENT
"Silent"
"Leise"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"MMU Netzfehler" "MMU Netzfehler"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Modus [Stealth]" "\x00"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Modus[Auto Power]" "\x00"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Modus[Hohe Leist]" "Hohe leist"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Resumiendo..." "MMU OK. Resumiendo..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"Modo [Normal]" "Modo"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Modo [silencio]" "\x00"
#MSG_SILENT
"Silent"
"Silencio"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"Fallo de energia en MMU" "Fallo de energia en MMU"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Modo [Silencio]" "Silencio"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Modo[fuerza auto]" "Fuerza auto"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Modo [rend.pleno]" "Rend.pleno"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Reprise ..." "MMU OK. Reprise ..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"\x00" "\x00"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Mode [silencieux]" "\x00"
#MSG_SILENT
"Silent"
"Silencieux"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"Echecs alim. MMU" "Echecs alim. MMU"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Mode [Furtif]" "Furtif"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Mode [puiss.auto]" "Puiss.auto"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Mode [haute puiss]" "Haute puiss"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Riprendendo... " "MMU OK. Riprendendo... "
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"Modo [normale]" "Modo"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Modo [silenzioso]" "Normale"
#MSG_SILENT
"Silent"
"Silenzioso"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"Mancanza corrente MMU" "Mancanza corrente MMU"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Modo [Silenziosa]" "Silenziosa"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Modo [auto]" "Auto"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Mode [forte]" "Forte"
# #
"MMU2 connected" "MMU2 connected"

View File

@ -550,13 +550,17 @@
"MMU OK. Resuming..." "MMU OK. Resuming..."
"MMU OK. Wznawianie..." "MMU OK. Wznawianie..."
#MSG_STEALTH_MODE_OFF #MSG_MODE
"Mode [Normal]" "Mode"
"Tryb [normalny]" "Tryb"
#MSG_SILENT_MODE_ON #MSG_NORMAL
"Mode [silent]" "Normal"
"Tryb [cichy]" "Normalny"
#MSG_SILENT
"Silent"
"Cichy"
# #
"MMU needs user attention." "MMU needs user attention."
@ -566,17 +570,17 @@
"MMU power fails" "MMU power fails"
"Zaniki zasil. MMU" "Zaniki zasil. MMU"
#MSG_STEALTH_MODE_ON #MSG_STEALTH
"Mode [Stealth]" "Stealth"
"Tryb [Stealth]" "\x00"
#MSG_AUTO_MODE_ON #MSG_AUTO_POWER
"Mode [auto power]" "Auto power"
"Tryb [automatycz]" "Automatycz"
#MSG_SILENT_MODE_OFF #MSG_HIGH_POWER
"Mode [high power]" "High power"
"Tryb[wysoka wyd.]" "Wysoka wyd."
# #
"MMU2 connected" "MMU2 connected"