Browse Source

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

pull/1/head
InsanityAutomation 6 years ago
committed by Scott Lahteine
parent
commit
75f2665f2e
  1. 4
      Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp
  2. 3
      Marlin/src/lcd/language/language_en.h
  3. 35
      Marlin/src/lcd/menu/menu_main.cpp
  4. 10
      Marlin/src/lcd/menu/menu_temperature.cpp
  5. 8
      Marlin/src/lcd/menu/menu_tune.cpp

4
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M524_M928.cpp

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

3
Marlin/src/lcd/language/language_en.h

@ -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

35
Marlin/src/lcd/menu/menu_main.cpp

@ -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,14 +175,12 @@ 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()) {
@ -172,7 +197,7 @@ void menu_main() {
#endif
MENU_ITEM(function, MSG_NO_CARD, NULL);
}
#endif // SDSUPPORT
#endif // HAS_ENCODER_WHEEL && SDSUPPORT
END_MENU();
}

10
Marlin/src/lcd/menu/menu_temperature.cpp

@ -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:
//

8
Marlin/src/lcd/menu/menu_tune.cpp

@ -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:
//

Loading…
Cancel
Save