🧑‍💻 HAS_MARLINUI_MENU, HAS_MANUAL_MOVE_MENU

This commit is contained in:
Scott Lahteine
2022-01-25 15:33:03 -06:00
parent 33c89547f0
commit 2dcc3ddeed
63 changed files with 201 additions and 197 deletions

View File

@ -156,7 +156,7 @@ constexpr float g26_e_axis_feedrate = 0.025;
static MeshFlags circle_flags;
float g26_random_deviation = 0.0;
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
/**
* If the LCD is clicked, cancel, wait for release, return true
@ -164,7 +164,7 @@ float g26_random_deviation = 0.0;
bool user_canceled() {
if (!ui.button_pressed()) return false; // Return if the button isn't pressed
ui.set_status(GET_TEXT_F(MSG_G26_CANCELED), 99);
TERN_(HAS_LCD_MENU, ui.quick_feedback());
TERN_(HAS_MARLINUI_MENU, ui.quick_feedback());
ui.wait_for_release();
return true;
}
@ -325,7 +325,7 @@ typedef struct {
#if HAS_WIRED_LCD
ui.set_status(GET_TEXT_F(MSG_G26_HEATING_BED), 99);
ui.quick_feedback();
TERN_(HAS_LCD_MENU, ui.capture());
TERN_(HAS_MARLINUI_MENU, ui.capture());
#endif
thermalManager.setTargetBed(bed_temp);
@ -365,7 +365,7 @@ typedef struct {
bool prime_nozzle() {
const feedRate_t fr_slow_e = planner.settings.max_feedrate_mm_s[E_AXIS] / 15.0f;
#if HAS_LCD_MENU && !HAS_TOUCH_BUTTONS // ui.button_pressed issue with touchscreen
#if HAS_MARLINUI_MENU && !HAS_TOUCH_BUTTONS // ui.button_pressed issue with touchscreen
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
float Total_Prime = 0.0;
#endif
@ -579,7 +579,7 @@ void GcodeSuite::G26() {
if (parser.seen('P')) {
if (!parser.has_value()) {
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
g26.prime_flag = -1;
#else
SERIAL_ECHOLNPGM("?Prime length must be specified when not using an LCD.");
@ -638,7 +638,7 @@ void GcodeSuite::G26() {
// Get repeat from 'R', otherwise do one full circuit
int16_t g26_repeats;
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
g26_repeats = parser.intval('R', GRID_MAX_POINTS + 1);
#else
if (parser.seen('R'))
@ -699,7 +699,7 @@ void GcodeSuite::G26() {
move_to(destination, 0.0);
move_to(destination, g26.ooze_amount);
TERN_(HAS_LCD_MENU, ui.capture());
TERN_(HAS_MARLINUI_MENU, ui.capture());
#if DISABLED(ARC_SUPPORT)
@ -795,7 +795,7 @@ void GcodeSuite::G26() {
destination = current_position;
}
if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation
if (TERN0(HAS_MARLINUI_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation
#else // !ARC_SUPPORT
@ -819,7 +819,7 @@ void GcodeSuite::G26() {
for (int8_t ind = start_ind; ind <= end_ind; ind++) {
if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation
if (TERN0(HAS_MARLINUI_MENU, user_canceled())) goto LEAVE; // Check if the user wants to stop the Mesh Validation
xyz_float_t p = { circle.x + _COS(ind ), circle.y + _SIN(ind ), g26.layer_height },
q = { circle.x + _COS(ind + 1), circle.y + _SIN(ind + 1), g26.layer_height };
@ -846,7 +846,7 @@ void GcodeSuite::G26() {
g26.connect_neighbor_with_line(location.pos, 0, 1);
planner.synchronize();
TERN_(EXTENSIBLE_UI, ExtUI::onMeshUpdate(location.pos, ExtUI::G26_POINT_FINISH));
if (TERN0(HAS_LCD_MENU, user_canceled())) goto LEAVE;
if (TERN0(HAS_MARLINUI_MENU, user_canceled())) goto LEAVE;
}
SERIAL_FLUSH(); // Prevent host M105 buffer overrun.
@ -866,7 +866,7 @@ void GcodeSuite::G26() {
planner.calculate_volumetric_multipliers();
#endif
TERN_(HAS_LCD_MENU, ui.release()); // Give back control of the LCD
TERN_(HAS_MARLINUI_MENU, ui.release()); // Give back control of the LCD
if (!g26.keep_heaters_on) {
TERN_(HAS_HEATED_BED, thermalManager.setTargetBed(0));

View File

@ -63,7 +63,7 @@
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_STATE);
#endif
TERN_(HAS_LCD_MENU, ui.reset_status());
TERN_(HAS_MARLINUI_MENU, ui.reset_status());
}
#endif // PSU_CONTROL

View File

@ -85,7 +85,7 @@ void GcodeSuite::M125() {
ui.pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT);
// If possible, show an LCD prompt with the 'P' flag
const bool show_lcd = TERN0(HAS_LCD_MENU, parser.boolval('P'));
const bool show_lcd = TERN0(HAS_MARLINUI_MENU, parser.boolval('P'));
if (pause_print(retract, park_point, show_lcd, 0)) {
if (ENABLED(EXTENSIBLE_UI) || BOTH(EMERGENCY_PARSER, HOST_PROMPT_SUPPORT) || !sd_printing || show_lcd) {

View File

@ -54,7 +54,7 @@ inline void plr_error(FSTR_P const prefix) {
#endif
}
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
void lcd_power_loss_recovery_cancel();
#endif
@ -67,7 +67,7 @@ void GcodeSuite::M1000() {
if (recovery.valid()) {
if (parser.seen_test('S')) {
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
ui.goto_screen(menu_job_recovery);
#elif HAS_DWIN_E3V2_BASIC
recovery.dwin_flag = true;
@ -80,7 +80,7 @@ void GcodeSuite::M1000() {
#endif
}
else if (parser.seen_test('C')) {
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
lcd_power_loss_recovery_cancel();
#else
recovery.cancel();

View File

@ -31,7 +31,7 @@
#include "../../module/planner.h" // for synchronize()
#include "../../MarlinCore.h" // for wait_for_user_response()
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
#include "../../lcd/marlinui.h"
#elif ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extui/ui_api.h"
@ -55,7 +55,7 @@ void GcodeSuite::M0_M1() {
planner.synchronize();
#if HAS_LCD_MENU
#if HAS_MARLINUI_MENU
if (parser.string_arg)
ui.set_status(parser.string_arg, true);
@ -89,7 +89,7 @@ void GcodeSuite::M0_M1() {
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(ms));
TERN_(HAS_LCD_MENU, ui.reset_status());
TERN_(HAS_MARLINUI_MENU, ui.reset_status());
}
#endif // HAS_RESUME_CONTINUE

View File

@ -355,7 +355,7 @@ public:
return input_temp_units == TEMPUNIT_K ? F("Kelvin") : input_temp_units == TEMPUNIT_F ? F("Fahrenheit") : F("Celsius");
}
#if HAS_LCD_MENU && DISABLED(DISABLE_M503)
#if HAS_MARLINUI_MENU && DISABLED(DISABLE_M503)
static float to_temp_units(celsius_t c) {
switch (input_temp_units) {
@ -366,7 +366,7 @@ public:
}
}
#endif // HAS_LCD_MENU && !DISABLE_M503
#endif // HAS_MARLINUI_MENU && !DISABLE_M503
static celsius_t value_celsius() {
float f = value_float();

View File

@ -522,7 +522,7 @@ void GCodeQueue::get_serial_commands() {
#if DISABLED(EMERGENCY_PARSER)
// Process critical commands early
if (command[0] == 'M') switch (command[3]) {
case '8': if (command[2] == '0' && command[1] == '1') { wait_for_heatup = false; TERN_(HAS_LCD_MENU, wait_for_user = false); } break;
case '8': if (command[2] == '0' && command[1] == '1') { wait_for_heatup = false; TERN_(HAS_MARLINUI_MENU, wait_for_user = false); } break;
case '2': if (command[2] == '1' && command[1] == '1') kill(FPSTR(M112_KILL_STR), nullptr, true); break;
case '0': if (command[1] == '4' && command[2] == '1') quickstop_stepper(); break;
}

View File

@ -98,7 +98,7 @@ void GcodeSuite::M1001() {
printerEventLEDs.onPrintCompleted();
TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PRINT_DONE)));
TERN_(HOST_PROMPT_SUPPORT, hostui.prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_PRINT_DONE), FPSTR(CONTINUE_STR)));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30))));
TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_MARLINUI_MENU, PE_LEDS_COMPLETED_TIME, 30))));
printerEventLEDs.onResumeAfterWait();
}
#endif