Followup to Menu Refactor (#12275)

This commit is contained in:
Scott Lahteine
2018-10-30 16:34:45 -05:00
committed by GitHub
parent 5536228359
commit 3583e2b449
45 changed files with 244 additions and 273 deletions

View File

@ -143,7 +143,7 @@
constexpr float unified_bed_leveling::_mesh_index_to_xpos[16],
unified_bed_leveling::_mesh_index_to_ypos[16];
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
bool unified_bed_leveling::lcd_map_control = false;
#endif

View File

@ -157,7 +157,7 @@ class unified_bed_leveling {
MESH_MIN_Y + 14 * (MESH_Y_DIST), MESH_MIN_Y + 15 * (MESH_Y_DIST)
};
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
static bool lcd_map_control;
#endif

View File

@ -628,7 +628,7 @@
LEAVE:
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_reset_alert_level();
lcd_quick_feedback(true);
lcd_reset_status();

View File

@ -45,7 +45,7 @@
#include "../feature/runout.h"
#endif
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
#include "../lcd/ultralcd.h"
#endif
@ -102,7 +102,7 @@ static bool ensure_safe_temperature(const AdvancedPauseMode mode=ADVANCED_PAUSE_
}
#endif
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_WAIT_FOR_NOZZLES_TO_HEAT, mode);
#else
UNUSED(mode);
@ -139,7 +139,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#endif
if (!ensure_safe_temperature(mode)) {
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) // Show status screen
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
#endif
@ -148,7 +148,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
}
if (pause_for_user) {
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) // Show "insert filament"
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT, mode);
#endif
@ -172,7 +172,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
KEEPALIVE_STATE(IN_HANDLER);
}
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) // Show "wait for load" message
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_LOAD, mode);
#endif
@ -209,7 +209,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
#if ENABLED(ADVANCED_PAUSE_CONTINUOUS_PURGE)
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd)
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CONTINUOUS_PURGE);
#endif
@ -224,7 +224,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
do {
if (purge_length > 0) {
// "Wait for filament purge"
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd)
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_PURGE, mode);
#endif
@ -234,7 +234,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
}
// Show "Purge More" / "Resume" menu and wait for reply
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) {
KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = false;
@ -246,7 +246,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
// Keep looping if "Purge More" was selected
} while (
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
show_lcd && advanced_pause_menu_response == ADVANCED_PAUSE_RESPONSE_EXTRUDE_MORE
#else
0
@ -272,7 +272,7 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
const AdvancedPauseMode mode/*=ADVANCED_PAUSE_MODE_PAUSE_PRINT*/
) {
if (!ensure_safe_temperature(mode)) {
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) // Show status screen
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
#endif
@ -342,7 +342,7 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
#endif
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) // Show initial message
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INIT);
#endif
@ -351,7 +351,7 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
SERIAL_ERROR_START();
SERIAL_ERRORLNPGM(MSG_ERR_HOTEND_TOO_COLD);
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
if (show_lcd) { // Show status screen
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
LCD_MESSAGEPGM(MSG_M600_TOO_COLD);
@ -416,7 +416,7 @@ bool pause_print(const float &retract, const point_t &park_point, const float &u
void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
bool nozzle_timed_out = false;
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
#endif
SERIAL_ECHO_START();
@ -454,11 +454,11 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
nozzle_timed_out |= thermalManager.is_heater_idle(e);
if (nozzle_timed_out) {
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_CLICK_TO_HEAT_NOZZLE);
#endif
SERIAL_ECHO_START();
#if ENABLED(ULTIPANEL) && ENABLED(EMERGENCY_PARSER)
#if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT);
#elif ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_HEAT_M108);
@ -475,11 +475,11 @@ void wait_for_filament_reload(const int8_t max_beep_count/*=0*/ DXC_ARGS) {
// Wait for the heaters to reach the target temperatures
ensure_safe_temperature();
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_INSERT);
#endif
SERIAL_ECHO_START();
#if ENABLED(ULTIPANEL) && ENABLED(EMERGENCY_PARSER)
#if HAS_LCD_MENU && ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT);
#elif ENABLED(EMERGENCY_PARSER)
SERIAL_ECHOLNPGM(MSG_FILAMENT_CHANGE_INSERT_M108);
@ -550,7 +550,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
if (nozzle_timed_out || thermalManager.hotEnoughToExtrude(active_extruder)) // Load the new filament
load_filament(slow_load_length, fast_load_length, purge_length, max_beep_count, true, nozzle_timed_out, ADVANCED_PAUSE_MODE_PAUSE_PRINT DXC_PASS);
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_RESUME); // "Wait for print to resume"
#endif
@ -578,7 +578,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
runout.reset();
#endif
#if ENABLED(ULTIPANEL)
#if HAS_LCD_MENU
// Show status screen
lcd_advanced_pause_show_message(ADVANCED_PAUSE_MESSAGE_STATUS);
#endif