Move some MarlinCore and MarlinUI code (#20832)
This commit is contained in:
@ -544,6 +544,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
||||
|
||||
// Put Relevant Text on Display
|
||||
|
||||
extern const char X_LBL[], Y_LBL[], Z_LBL[];
|
||||
|
||||
// Show X and Y positions at top of screen
|
||||
u8g.setColorIndex(1);
|
||||
if (PAGE_UNDER(7)) {
|
||||
|
@ -30,7 +30,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "../../../inc/MarlinConfig.h"
|
||||
#include "../../../MarlinCore.h"
|
||||
|
||||
/*********************** Encoder Set ***********************/
|
||||
|
||||
|
@ -27,8 +27,8 @@
|
||||
#include "../../ui_api.h"
|
||||
|
||||
#include "../../../../libs/numtostr.h"
|
||||
#include "../../../../module/motion.h" // for A20 read printing speed feedrate_percentage
|
||||
#include "../../../../MarlinCore.h" // for quickstop_stepper, disable_steppers, G28_STR
|
||||
#include "../../../../module/motion.h" // for quickstop_stepper, A20 read printing speed, feedrate_percentage
|
||||
#include "../../../../MarlinCore.h" // for disable_steppers, G28_STR
|
||||
#include "../../../../inc/MarlinConfig.h"
|
||||
|
||||
// command sending macro's with debugging capability
|
||||
|
@ -25,7 +25,8 @@
|
||||
|
||||
#include "../../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#include "../../../../MarlinCore.h"
|
||||
#include <stdlib.h> // size_t
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#include "../../../../module/probe.h"
|
||||
#endif
|
||||
@ -96,7 +97,7 @@ private:
|
||||
static void WritePGM(const char str[], uint8_t len);
|
||||
static void ProcessRx();
|
||||
|
||||
static inline uint16_t swap16(const uint16_t value) { return (value & 0xffU) << 8U | (value >> 8U); }
|
||||
static inline uint16_t swap16(const uint16_t value) { return (value & 0xFFU) << 8U | (value >> 8U); }
|
||||
static rx_datagram_state_t rx_datagram_state;
|
||||
static uint8_t rx_datagram_len;
|
||||
static bool Initialized, no_reentrance;
|
||||
|
@ -23,8 +23,6 @@
|
||||
|
||||
#if HAS_TFT_LVGL_UI
|
||||
|
||||
#include "../../../../MarlinCore.h"
|
||||
|
||||
#include "draw_ui.h"
|
||||
#include "tft_multi_language.h"
|
||||
|
||||
|
@ -39,6 +39,10 @@
|
||||
#include "../../../../module/planner.h"
|
||||
#include "../../../../module/servo.h"
|
||||
#include "../../../../module/probe.h"
|
||||
|
||||
#if DISABLED(EMERGENCY_PARSER)
|
||||
#include "../../../../module/motion.h"
|
||||
#endif
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
#include "../../../../feature/powerloss.h"
|
||||
#endif
|
||||
|
@ -1516,7 +1516,7 @@ void MarlinUI::update() {
|
||||
LCD_MESSAGEPGM(MSG_PRINT_PAUSED);
|
||||
|
||||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||
TERN_(HAS_WIRED_LCD, lcd_pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT)); // Show message immediately to let user know about pause in progress
|
||||
pause_show_message(PAUSE_MESSAGE_PARKING, PAUSE_MODE_PAUSE_PRINT); // Show message immediately to let user know about pause in progress
|
||||
queue.inject_P(PSTR("M25 P\nM24"));
|
||||
#elif ENABLED(SDSUPPORT)
|
||||
queue.inject_P(PSTR("M25"));
|
||||
|
@ -51,15 +51,13 @@
|
||||
#include "../module/printcounter.h"
|
||||
#endif
|
||||
|
||||
#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
|
||||
#include "../feature/pause.h"
|
||||
#include "../module/motion.h" // for active_extruder
|
||||
#endif
|
||||
|
||||
#if HAS_WIRED_LCD
|
||||
|
||||
#include "../MarlinCore.h"
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#include "../feature/pause.h"
|
||||
#include "../module/motion.h" // for active_extruder
|
||||
#endif
|
||||
|
||||
enum LCDViewAction : uint8_t {
|
||||
LCDVIEW_NONE,
|
||||
LCDVIEW_REDRAW_NOW,
|
||||
@ -87,12 +85,6 @@
|
||||
typedef void (*screenFunc_t)();
|
||||
typedef void (*menuAction_t)();
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
void lcd_pause_show_message(const PauseMessage message,
|
||||
const PauseMode mode=PAUSE_MODE_SAME,
|
||||
const uint8_t extruder=active_extruder);
|
||||
#endif
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL)
|
||||
void lcd_mesh_edit_setup(const float &initial);
|
||||
float lcd_mesh_edit();
|
||||
@ -506,6 +498,13 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
#if BOTH(HAS_LCD_MENU, ADVANCED_PAUSE_FEATURE)
|
||||
static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
#else
|
||||
static inline void _pause_show_message() {}
|
||||
#define pause_show_message(...) _pause_show_message()
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM: Reset / Init / Load / Store
|
||||
//
|
||||
|
@ -161,6 +161,8 @@ void menu_advanced_settings();
|
||||
#include "../../module/motion.h"
|
||||
#include "../../gcode/queue.h"
|
||||
|
||||
extern const char G28_STR[];
|
||||
|
||||
void menu_tool_offsets() {
|
||||
|
||||
auto _recalc_offsets = []{
|
||||
|
@ -53,6 +53,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
|
||||
|
||||
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
||||
|
||||
#include "../../MarlinCore.h" // for wait_for_user_response()
|
||||
#include "../../gcode/gcode.h"
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
@ -81,6 +82,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
|
||||
}
|
||||
|
||||
void _lcd_delta_calibrate_home() {
|
||||
extern const char G28_STR[];
|
||||
queue.inject_P(G28_STR);
|
||||
ui.goto_screen(_lcd_calibrate_homing);
|
||||
}
|
||||
|
@ -107,6 +107,8 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
||||
*/
|
||||
#if E_STEPPERS > 1 || ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
|
||||
|
||||
bool printingIsPaused();
|
||||
|
||||
void menu_change_filament() {
|
||||
// Say "filament change" when no print is active
|
||||
editable.int8 = printingIsPaused() ? PAUSE_MODE_PAUSE_PRINT : PAUSE_MODE_CHANGE_FILAMENT;
|
||||
@ -315,7 +317,7 @@ FORCE_INLINE screenFunc_t ap_message_screen(const PauseMessage message) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void lcd_pause_show_message(
|
||||
void MarlinUI::pause_show_message(
|
||||
const PauseMessage message,
|
||||
const PauseMode mode/*=PAUSE_MODE_SAME*/,
|
||||
const uint8_t extruder/*=active_extruder*/
|
||||
|
@ -51,6 +51,8 @@
|
||||
float manual_move_e_origin = 0;
|
||||
#endif
|
||||
|
||||
extern const char G28_STR[];
|
||||
|
||||
//
|
||||
// "Motion" > "Move Axis" submenu
|
||||
//
|
||||
|
Reference in New Issue
Block a user