|
@@ -3281,9 +3281,17 @@ static void lcd_sort_type_set() {
|
|
|
}
|
|
|
#endif //SDCARD_SORT_ALPHA
|
|
|
|
|
|
+static void lcd_crash_mode_info2()
|
|
|
+{
|
|
|
+ lcd_show_fullscreen_message_and_wait_P(PSTR("WARNING: crashdetection unavailable in STEALTH mode."));
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
static void lcd_silent_mode_set() {
|
|
|
SilentModeMenu = !SilentModeMenu;
|
|
|
eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
|
|
|
+ if (CrashDetectMenu && SilentModeMenu)
|
|
|
+ lcd_crash_mode_info2();
|
|
|
#ifdef TMC2130
|
|
|
st_synchronize();
|
|
|
if (tmc2130_wait_standstill_xy(1000)) {}
|
|
@@ -3300,6 +3308,12 @@ static void lcd_silent_mode_set() {
|
|
|
else lcd_goto_menu(lcd_settings_menu, 7);
|
|
|
}
|
|
|
|
|
|
+static void lcd_crash_mode_info()
|
|
|
+{
|
|
|
+ lcd_show_fullscreen_message_and_wait_P(PSTR("Crash-detection can be used only in NORMAL mode."));
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
static void lcd_crash_mode_set()
|
|
|
{
|
|
|
CrashDetectMenu = !CrashDetectMenu; //set also from crashdet_enable() and crashdet_disable()
|
|
@@ -3763,14 +3777,15 @@ static void lcd_settings_menu()
|
|
|
MENU_ITEM(function, MSG_FANS_CHECK_OFF, lcd_set_fan_check);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- if (SilentModeMenu == 0) {
|
|
|
- if (CrashDetectMenu == 0) {
|
|
|
- MENU_ITEM(function, MSG_CRASHDETECT_OFF, lcd_crash_mode_set);
|
|
|
- } else {
|
|
|
- MENU_ITEM(function, MSG_CRASHDETECT_ON, lcd_crash_mode_set);
|
|
|
- }
|
|
|
+ if (SilentModeMenu == 0) MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set);
|
|
|
+ else MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set);
|
|
|
+ if (SilentModeMenu == 0)
|
|
|
+ {
|
|
|
+ if (CrashDetectMenu == 0) MENU_ITEM(function, MSG_CRASHDETECT_OFF, lcd_crash_mode_set);
|
|
|
+ else MENU_ITEM(function, MSG_CRASHDETECT_ON, lcd_crash_mode_set);
|
|
|
}
|
|
|
+ else MENU_ITEM(function, MSG_CRASHDETECT_NA, lcd_crash_mode_info);
|
|
|
+
|
|
|
if (temp_cal_active == false) {
|
|
|
MENU_ITEM(function, MSG_TEMP_CALIBRATION_OFF, lcd_temp_calibration_set);
|
|
|
}
|
|
@@ -3784,13 +3799,7 @@ static void lcd_settings_menu()
|
|
|
MENU_ITEM(function, MSG_SECOND_SERIAL_ON, lcd_second_serial_set);
|
|
|
}
|
|
|
|
|
|
- if (SilentModeMenu == 0) {
|
|
|
- MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set);
|
|
|
- }
|
|
|
- else {
|
|
|
- MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set);
|
|
|
- }
|
|
|
- if (!isPrintPaused && !homing_flag)
|
|
|
+ if (!isPrintPaused && !homing_flag)
|
|
|
{
|
|
|
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
|
|
|
}
|
|
@@ -5075,20 +5084,6 @@ static void lcd_autostart_sd()
|
|
|
|
|
|
|
|
|
|
|
|
-static void lcd_silent_mode_set_tune() {
|
|
|
- SilentModeMenu = !SilentModeMenu;
|
|
|
- eeprom_update_byte((unsigned char*)EEPROM_SILENT, SilentModeMenu);
|
|
|
-#ifdef TMC2130
|
|
|
- st_synchronize();
|
|
|
- cli();
|
|
|
- tmc2130_mode = SilentModeMenu?TMC2130_MODE_SILENT:TMC2130_MODE_NORMAL;
|
|
|
- tmc2130_init();
|
|
|
- sei();
|
|
|
-#endif //TMC2130
|
|
|
- digipot_init();
|
|
|
- lcd_goto_menu(lcd_tune_menu, 9);
|
|
|
-}
|
|
|
-
|
|
|
static void lcd_colorprint_change() {
|
|
|
|
|
|
enquecommand_P(PSTR("M600"));
|
|
@@ -5125,19 +5120,15 @@ static void lcd_tune_menu()
|
|
|
MENU_ITEM(function, MSG_FSENSOR_ON, lcd_fsensor_state_set);
|
|
|
}
|
|
|
|
|
|
- if (SilentModeMenu == 0) {
|
|
|
- MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set);
|
|
|
- } else {
|
|
|
- MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set);
|
|
|
- }
|
|
|
+ if (SilentModeMenu == 0) MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set);
|
|
|
+ else MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set);
|
|
|
|
|
|
- if (SilentModeMenu == 0) {
|
|
|
- if (CrashDetectMenu == 0) {
|
|
|
- MENU_ITEM(function, MSG_CRASHDETECT_OFF, lcd_crash_mode_set);
|
|
|
- } else {
|
|
|
- MENU_ITEM(function, MSG_CRASHDETECT_ON, lcd_crash_mode_set);
|
|
|
- }
|
|
|
+ if (SilentModeMenu == 0)
|
|
|
+ {
|
|
|
+ if (CrashDetectMenu == 0) MENU_ITEM(function, MSG_CRASHDETECT_OFF, lcd_crash_mode_set);
|
|
|
+ else MENU_ITEM(function, MSG_CRASHDETECT_ON, lcd_crash_mode_set);
|
|
|
}
|
|
|
+ else MENU_ITEM(function, MSG_CRASHDETECT_NA, lcd_crash_mode_info);
|
|
|
|
|
|
END_MENU();
|
|
|
}
|