LCD SD Card items near top when not using wheel (#12926)

This commit is contained in:
InsanityAutomation 2019-01-21 00:24:53 -05:00 committed by Scott Lahteine
parent e1f951813a
commit 75f2665f2e
5 changed files with 57 additions and 13 deletions

View File

@ -103,11 +103,11 @@ void GcodeSuite::M24() {
print_job_timer.start();
}
ui.reset_status();
#ifdef ACTION_ON_RESUME
SERIAL_ECHOLNPGM("//action:" ACTION_ON_RESUME);
#endif
ui.reset_status();
}
/**

View File

@ -810,6 +810,9 @@
#ifndef MSG_SINGLENOZZLE_RETRACT_SPD
#define MSG_SINGLENOZZLE_RETRACT_SPD _UxGT("Retract Speed")
#endif
#ifndef MSG_NOZZLE_STANDBY
#define MSG_NOZZLE_STANDBY _UxGT("Nozzle Standby")
#endif
#ifndef MSG_FILAMENTCHANGE
#define MSG_FILAMENTCHANGE _UxGT("Change filament")
#endif

View File

@ -104,9 +104,36 @@ void menu_main() {
if (card.isFileOpen())
MENU_ITEM(submenu, MSG_STOP_PRINT, menu_sdcard_abort_confirm);
#endif
#if !defined(ACTION_ON_RESUME) && ENABLED(SDSUPPORT)
if (card.isFileOpen())
#endif
MENU_ITEM(submenu, MSG_TUNE, menu_tune);
}
else {
#if !HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
//
// Autostart
//
#if ENABLED(MENU_ADDAUTOSTART)
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
#endif
if (card.isDetected()) {
if (!card.isFileOpen()) {
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
#endif
}
}
else {
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually init SD-card
#endif
MENU_ITEM(function, MSG_NO_CARD, NULL);
}
#endif // !HAS_ENCODER_WHEEL && SDSUPPORT
MENU_ITEM(function, MSG_RESUME_PRINT, lcd_resume);
MENU_ITEM(submenu, MSG_MOTION, menu_motion);
@ -148,22 +175,20 @@ void menu_main() {
MENU_ITEM(gcode, MSG_SWITCH_PS_ON, PSTR("M80"));
#endif
#if ENABLED(SDSUPPORT)
#if HAS_ENCODER_WHEEL && ENABLED(SDSUPPORT)
//
// Autostart
//
#if ENABLED(MENU_ADDAUTOSTART)
if (!busy)
MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
if (!busy) MENU_ITEM(function, MSG_AUTOSTART, card.beginautostart);
#endif
if (card.isDetected()) {
if(!card.isFileOpen()) {
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
#endif
if (!card.isFileOpen()) {
MENU_ITEM(submenu, MSG_CARD_MENU, menu_sdcard);
#if !PIN_EXISTS(SD_DETECT)
MENU_ITEM(gcode, MSG_CHANGE_SDCARD, PSTR("M21")); // SD-card changed by user
#endif
}
}
else {
@ -172,7 +197,7 @@ void menu_main() {
#endif
MENU_ITEM(function, MSG_NO_CARD, NULL);
}
#endif // SDSUPPORT
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
END_MENU();
}

View File

@ -31,10 +31,14 @@
#include "menu.h"
#include "../../module/temperature.h"
#if FAN_COUNT > 1
#if FAN_COUNT > 1 || ENABLED(SINGLENOZZLE)
#include "../../module/motion.h"
#endif
#if ENABLED(SINGLENOZZLE)
#include "../../module/tool_change.h"
#endif
// Initialized by settings.load()
int16_t MarlinUI::preheat_hotend_temp[2], MarlinUI::preheat_bed_temp[2];
uint8_t MarlinUI::preheat_fan_speed[2];
@ -327,6 +331,10 @@ void menu_temperature() {
#endif // HOTENDS > 2
#endif // HOTENDS > 1
#if ENABLED(SINGLENOZZLE)
MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
#endif
//
// Bed:
//

View File

@ -38,6 +38,10 @@
#include "../../feature/bedlevel/bedlevel.h"
#endif
#if ENABLED(SINGLENOZZLE)
#include "../../module/tool_change.h"
#endif
// Refresh the E factor after changing flow
void _lcd_refresh_e_factor_0() { planner.refresh_e_factor(0); }
#if EXTRUDERS > 1
@ -129,6 +133,10 @@ void menu_tune() {
#endif // HOTENDS > 2
#endif // HOTENDS > 1
#if ENABLED(SINGLENOZZLE)
MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
#endif
//
// Bed:
//