mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
🎨 Fix and improve FTDI Eve Touch UI (#22223)
This commit is contained in:
parent
38e775496a
commit
08895e6cb0
105
Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h
Normal file
105
Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/screens.h
Normal file
@ -0,0 +1,105 @@
|
||||
/*************
|
||||
* screens.h *
|
||||
*************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <https://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
// is done using the CLCD::DLCache class, which takes a unique ID for each
|
||||
// cache location. These IDs are defined here:
|
||||
|
||||
enum {
|
||||
STATUS_SCREEN_CACHE,
|
||||
MENU_SCREEN_CACHE,
|
||||
TUNE_SCREEN_CACHE,
|
||||
ALERT_BOX_CACHE,
|
||||
SPINNER_CACHE,
|
||||
ADVANCED_SETTINGS_SCREEN_CACHE,
|
||||
TEMPERATURE_SCREEN_CACHE,
|
||||
STEPS_SCREEN_CACHE,
|
||||
MAX_FEEDRATE_SCREEN_CACHE,
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
FLOW_PERCENT_SCREEN_CACHE,
|
||||
ZOFFSET_SCREEN_CACHE,
|
||||
STEPPER_CURRENT_SCREEN_CACHE,
|
||||
STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
|
||||
PRINTING_SCREEN_CACHE,
|
||||
FILES_SCREEN_CACHE,
|
||||
INTERFACE_SETTINGS_SCREEN_CACHE,
|
||||
INTERFACE_SOUNDS_SCREEN_CACHE,
|
||||
LOCK_SCREEN_CACHE,
|
||||
DISPLAY_TIMINGS_SCREEN_CACHE
|
||||
};
|
||||
|
||||
// To save MCU RAM, the status message is "baked" in to the status screen
|
||||
// cache, so we reserve a large chunk of memory for the DL cache
|
||||
|
||||
#define STATUS_SCREEN_DL_SIZE 4096
|
||||
#define ALERT_BOX_DL_SIZE 3072
|
||||
#define SPINNER_DL_SIZE 3072
|
||||
#define FILE_SCREEN_DL_SIZE 4160
|
||||
#define PRINTING_SCREEN_DL_SIZE 2048
|
||||
|
||||
/************************* MENU SCREEN DECLARATIONS *************************/
|
||||
|
||||
#include "../generic/base_screen.h"
|
||||
#include "../generic/base_numeric_adjustment_screen.h"
|
||||
#include "../generic/dialog_box_base_class.h"
|
||||
#include "../generic/boot_screen.h"
|
||||
#include "../generic/about_screen.h"
|
||||
#include "../generic/kill_screen.h"
|
||||
#include "../generic/alert_dialog_box.h"
|
||||
#include "../generic/spinner_dialog_box.h"
|
||||
#include "../generic/restore_failsafe_dialog_box.h"
|
||||
#include "../generic/save_settings_dialog_box.h"
|
||||
#include "../generic/confirm_start_print_dialog_box.h"
|
||||
#include "../generic/confirm_abort_print_dialog_box.h"
|
||||
#include "../generic/confirm_user_request_alert_box.h"
|
||||
#include "../generic/touch_calibration_screen.h"
|
||||
#include "../generic/move_axis_screen.h"
|
||||
#include "../generic/steps_screen.h"
|
||||
#include "../generic/feedrate_percent_screen.h"
|
||||
#include "../generic/max_velocity_screen.h"
|
||||
#include "../generic/max_acceleration_screen.h"
|
||||
#include "../generic/default_acceleration_screen.h"
|
||||
#include "../generic/temperature_screen.h"
|
||||
#include "../generic/interface_sounds_screen.h"
|
||||
#include "../generic/interface_settings_screen.h"
|
||||
#include "../generic/lock_screen.h"
|
||||
#include "../generic/endstop_state_screen.h"
|
||||
#include "../generic/display_tuning_screen.h"
|
||||
#include "../generic/media_player_screen.h"
|
||||
#include "../generic/statistics_screen.h"
|
||||
#include "../generic/stepper_current_screen.h"
|
||||
#include "../generic/stepper_bump_sensitivity_screen.h"
|
||||
#include "../generic/leveling_menu.h"
|
||||
#include "../generic/z_offset_screen.h"
|
||||
#include "../generic/files_screen.h"
|
||||
|
||||
#include "bio_status_screen.h"
|
||||
#include "bio_main_menu.h"
|
||||
#include "bio_tune_menu.h"
|
||||
#include "bio_advanced_settings.h"
|
||||
#include "bio_printing_dialog_box.h"
|
||||
#include "bio_confirm_home_xyz.h"
|
||||
#include "bio_confirm_home_e.h"
|
@ -84,16 +84,6 @@ void PreheatTimerScreen::draw_interaction_buttons(draw_mode_t what) {
|
||||
void PreheatTimerScreen::draw_adjuster(draw_mode_t what, uint8_t tag, progmem_str label, float value, int16_t x, int16_t y, int16_t w, int16_t h) {
|
||||
#define SUB_COLS 9
|
||||
#define SUB_ROWS 2
|
||||
#define SUB_GRID_W(W) ((W)*w/SUB_COLS)
|
||||
#define SUB_GRID_H(H) ((H)*h/SUB_ROWS)
|
||||
#define SUB_GRID_X(X) (SUB_GRID_W((X)-1) + x)
|
||||
#define SUB_GRID_Y(Y) (SUB_GRID_H((Y)-1) + y)
|
||||
#define SUB_X(X) (SUB_GRID_X(X) + MARGIN_L)
|
||||
#define SUB_Y(Y) (SUB_GRID_Y(Y) + MARGIN_T)
|
||||
#define SUB_W(W) (SUB_GRID_W(W) - MARGIN_L - MARGIN_R)
|
||||
#define SUB_H(H) (SUB_GRID_H(H) - MARGIN_T - MARGIN_B)
|
||||
#define SUB_POS(X,Y) SUB_X(X), SUB_Y(Y)
|
||||
#define SUB_SIZE(W,H) SUB_W(W), SUB_H(H)
|
||||
|
||||
CommandProcessor cmd;
|
||||
cmd.tag(0)
|
||||
|
135
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h
Normal file
135
Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/screens.h
Normal file
@ -0,0 +1,135 @@
|
||||
/*************
|
||||
* screens.h *
|
||||
*************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <https://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
// is done using the CLCD::DLCache class, which takes a unique ID for each
|
||||
// cache location. These IDs are defined here:
|
||||
|
||||
enum {
|
||||
STATUS_SCREEN_CACHE,
|
||||
MENU_SCREEN_CACHE,
|
||||
TUNE_SCREEN_CACHE,
|
||||
ALERT_BOX_CACHE,
|
||||
SPINNER_CACHE,
|
||||
ADVANCED_SETTINGS_SCREEN_CACHE,
|
||||
MOVE_AXIS_SCREEN_CACHE,
|
||||
TEMPERATURE_SCREEN_CACHE,
|
||||
STEPS_SCREEN_CACHE,
|
||||
MAX_FEEDRATE_SCREEN_CACHE,
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
FLOW_PERCENT_SCREEN_CACHE,
|
||||
LEVELING_SCREEN_CACHE,
|
||||
ZOFFSET_SCREEN_CACHE,
|
||||
BED_MESH_VIEW_SCREEN_CACHE,
|
||||
BED_MESH_EDIT_SCREEN_CACHE,
|
||||
STEPPER_CURRENT_SCREEN_CACHE,
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
JUNC_DEV_SCREEN_CACHE,
|
||||
#else
|
||||
JERK_SCREEN_CACHE,
|
||||
#endif
|
||||
CASE_LIGHT_SCREEN_CACHE,
|
||||
FILAMENT_MENU_CACHE,
|
||||
LINEAR_ADVANCE_SCREEN_CACHE,
|
||||
PREHEAT_MENU_CACHE,
|
||||
PREHEAT_TIMER_SCREEN_CACHE,
|
||||
LOAD_CHOCOLATE_SCREEN_CACHE,
|
||||
MOVE_XYZ_SCREEN_CACHE,
|
||||
MOVE_E_SCREEN_CACHE,
|
||||
FILES_SCREEN_CACHE,
|
||||
INTERFACE_SETTINGS_SCREEN_CACHE,
|
||||
INTERFACE_SOUNDS_SCREEN_CACHE,
|
||||
LOCK_SCREEN_CACHE,
|
||||
DISPLAY_TIMINGS_SCREEN_CACHE
|
||||
};
|
||||
|
||||
// To save MCU RAM, the status message is "baked" in to the status screen
|
||||
// cache, so we reserve a large chunk of memory for the DL cache
|
||||
|
||||
#define STATUS_SCREEN_DL_SIZE 4096
|
||||
#define ALERT_BOX_DL_SIZE 3072
|
||||
#define SPINNER_DL_SIZE 3072
|
||||
#define FILE_SCREEN_DL_SIZE 4160
|
||||
#define PRINTING_SCREEN_DL_SIZE 2048
|
||||
|
||||
/************************* MENU SCREEN DECLARATIONS *************************/
|
||||
|
||||
#include "../generic/base_screen.h"
|
||||
#include "../generic/base_numeric_adjustment_screen.h"
|
||||
#include "../generic/dialog_box_base_class.h"
|
||||
#include "../generic/boot_screen.h"
|
||||
#include "../generic/about_screen.h"
|
||||
#include "../generic/kill_screen.h"
|
||||
#include "../generic/alert_dialog_box.h"
|
||||
#include "../generic/spinner_dialog_box.h"
|
||||
#include "../generic/restore_failsafe_dialog_box.h"
|
||||
#include "../generic/save_settings_dialog_box.h"
|
||||
#include "../generic/confirm_start_print_dialog_box.h"
|
||||
#include "../generic/confirm_abort_print_dialog_box.h"
|
||||
#include "../generic/confirm_user_request_alert_box.h"
|
||||
#include "../generic/touch_calibration_screen.h"
|
||||
#include "../generic/move_axis_screen.h"
|
||||
#include "../generic/steps_screen.h"
|
||||
#include "../generic/feedrate_percent_screen.h"
|
||||
#include "../generic/max_velocity_screen.h"
|
||||
#include "../generic/max_acceleration_screen.h"
|
||||
#include "../generic/default_acceleration_screen.h"
|
||||
#include "../generic/temperature_screen.h"
|
||||
#include "../generic/interface_sounds_screen.h"
|
||||
#include "../generic/interface_settings_screen.h"
|
||||
#include "../generic/lock_screen.h"
|
||||
#include "../generic/endstop_state_screen.h"
|
||||
#include "../generic/display_tuning_screen.h"
|
||||
#include "../generic/statistics_screen.h"
|
||||
#include "../generic/stepper_current_screen.h"
|
||||
#include "../generic/leveling_menu.h"
|
||||
#include "../generic/z_offset_screen.h"
|
||||
#include "../generic/bed_mesh_base.h"
|
||||
#include "../generic/bed_mesh_view_screen.h"
|
||||
#include "../generic/bed_mesh_edit_screen.h"
|
||||
#include "../generic/case_light_screen.h"
|
||||
#include "../generic/linear_advance_screen.h"
|
||||
#include "../generic/files_screen.h"
|
||||
#include "../generic/move_axis_screen.h"
|
||||
#include "../generic/flow_percent_screen.h"
|
||||
#include "../generic/tune_menu.h"
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
#include "../generic/junction_deviation_screen.h"
|
||||
#else
|
||||
#include "../generic/jerk_screen.h"
|
||||
#endif
|
||||
|
||||
#include "status_screen.h"
|
||||
#include "main_menu.h"
|
||||
#include "advanced_settings_menu.h"
|
||||
#include "preheat_menu.h"
|
||||
#include "preheat_screen.h"
|
||||
#include "load_chocolate.h"
|
||||
#include "move_xyz_screen.h"
|
||||
#include "move_e_screen.h"
|
@ -45,24 +45,23 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
void onMediaInserted() {
|
||||
if (AT_SCREEN(StatusScreen))
|
||||
StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED));
|
||||
sound.play(media_inserted, PLAY_ASYNCHRONOUS);
|
||||
#if ENABLED(SDSUPPORT)
|
||||
sound.play(media_inserted, PLAY_ASYNCHRONOUS);
|
||||
StatusScreen::onMediaInserted();
|
||||
#endif
|
||||
}
|
||||
|
||||
void onMediaRemoved() {
|
||||
if (isPrintingFromMedia()) {
|
||||
stopPrint();
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
|
||||
}
|
||||
else
|
||||
sound.play(media_removed, PLAY_ASYNCHRONOUS);
|
||||
|
||||
if (AT_SCREEN(StatusScreen) || isPrintingFromMedia())
|
||||
StatusScreen::setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
|
||||
if (isPrintingFromMedia()) {
|
||||
stopPrint();
|
||||
InterfaceSoundsScreen::playEventSound(InterfaceSoundsScreen::PRINTING_FAILED);
|
||||
}
|
||||
else
|
||||
sound.play(media_removed, PLAY_ASYNCHRONOUS);
|
||||
|
||||
StatusScreen::onMediaRemoved();
|
||||
FilesScreen::onMediaRemoved();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -91,20 +91,22 @@ void AboutScreen::onRedraw(draw_mode_t) {
|
||||
draw_text_box(cmd, FW_INFO_POS, about_str, OPT_CENTER, font_medium);
|
||||
draw_text_box(cmd, INSET_POS(LICENSE_POS), GET_TEXT_F(MSG_LICENSE), OPT_CENTER, font_tiny);
|
||||
|
||||
cmd.font(font_medium)
|
||||
.colors(normal_btn)
|
||||
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU))
|
||||
.colors(action_btn)
|
||||
cmd.font(font_medium);
|
||||
#if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN)
|
||||
cmd.colors(normal_btn)
|
||||
.tag(2).button(STATS_POS, GET_TEXT_F(MSG_INFO_STATS_MENU));
|
||||
#endif
|
||||
cmd.colors(action_btn)
|
||||
.tag(1).button(BACK_POS, GET_TEXT_F(MSG_BACK));
|
||||
}
|
||||
|
||||
bool AboutScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); break;
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#if ENABLED(PRINTCOUNTER) && defined(FTDI_STATISTICS_SCREEN)
|
||||
case 2: GOTO_SCREEN(StatisticsScreen); break;
|
||||
#endif
|
||||
#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
|
||||
#if ENABLED(TOUCH_UI_DEVELOPER_MENU) && defined(FTDI_DEVELOPER_MENU)
|
||||
case 3: GOTO_SCREEN(DeveloperMenu); break;
|
||||
#endif
|
||||
default: return false;
|
||||
|
@ -76,7 +76,7 @@ constexpr static ChangeFilamentScreenData &mydata = screen_data.ChangeFilamentSc
|
||||
|
||||
/****************** COLOR SCALE ***********************/
|
||||
|
||||
uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) {
|
||||
uint32_t ChangeFilamentScreen::getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high) {
|
||||
rgb_t R0, R1, mix;
|
||||
|
||||
float t;
|
||||
|
@ -38,9 +38,9 @@ class ChangeFilamentScreen : public BaseScreen, public CachedScreen<CHANGE_FILAM
|
||||
static uint8_t getSoftenTemp();
|
||||
static ExtUI::extruder_t getExtruder();
|
||||
static void drawTempGradient(uint16_t x, uint16_t y, uint16_t w, uint16_t h);
|
||||
static uint32_t getTempColor(uint32_t temp);
|
||||
static void doPurge();
|
||||
public:
|
||||
static uint32_t getWarmColor(uint16_t temp, uint16_t cool, uint16_t low, uint16_t med, uint16_t high);
|
||||
static void onEntry();
|
||||
static void onExit();
|
||||
static void onRedraw(draw_mode_t);
|
||||
|
@ -262,4 +262,8 @@ void FilesScreen::onIdle() {
|
||||
#endif
|
||||
}
|
||||
|
||||
void FilesScreen::onMediaRemoved() {
|
||||
if (AT_SCREEN(FilesScreen)) GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
|
||||
#endif // FTDI_FILES_SCREEN
|
||||
|
@ -72,4 +72,5 @@ class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, F
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
static void onIdle();
|
||||
static void onMediaRemoved();
|
||||
};
|
||||
|
@ -86,10 +86,12 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
|
||||
}
|
||||
|
||||
if (what & FOREGROUND) {
|
||||
#if ENABLED(TOUCH_UI_PORTRAIT)
|
||||
constexpr uint8_t w = 2;
|
||||
#else
|
||||
constexpr uint8_t w = 1;
|
||||
#if defined(FTDI_LOCK_SCREEN) || DISABLED(TOUCH_UI_NO_BOOTSCREEN)
|
||||
#if ENABLED(TOUCH_UI_PORTRAIT)
|
||||
constexpr uint8_t w = 2;
|
||||
#else
|
||||
constexpr uint8_t w = 1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
cmd.font(font_medium)
|
||||
@ -99,8 +101,10 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
|
||||
.tag(2).slider(BTN_POS(3,2), BTN_SIZE(2,1), mydata.brightness, 128)
|
||||
#endif
|
||||
.tag(3).slider(BTN_POS(3,3), BTN_SIZE(2,1), mydata.volume, 0xFF)
|
||||
#ifdef FTDI_LOCK_SCREEN
|
||||
.colors(ui_toggle)
|
||||
.tag(4).toggle2(BTN_POS(3,4), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), LockScreen::is_enabled())
|
||||
#endif
|
||||
#if DISABLED(TOUCH_UI_NO_BOOTSCREEN)
|
||||
.tag(5).toggle2(BTN_POS(3,5), BTN_SIZE(w,1), GET_TEXT_F(MSG_NO), GET_TEXT_F(MSG_YES), UIData::animations_enabled())
|
||||
#endif
|
||||
@ -122,12 +126,14 @@ void InterfaceSettingsScreen::onRedraw(draw_mode_t what) {
|
||||
bool InterfaceSettingsScreen::onTouchEnd(uint8_t tag) {
|
||||
switch (tag) {
|
||||
case 1: GOTO_PREVIOUS(); return true;
|
||||
case 4:
|
||||
if (!LockScreen::is_enabled())
|
||||
LockScreen::enable();
|
||||
else
|
||||
LockScreen::disable();
|
||||
break;
|
||||
#ifdef FTDI_LOCK_SCREEN
|
||||
case 4:
|
||||
if (!LockScreen::is_enabled())
|
||||
LockScreen::enable();
|
||||
else
|
||||
LockScreen::disable();
|
||||
break;
|
||||
#endif
|
||||
case 5: UIData::enable_animations(!UIData::animations_enabled());; break;
|
||||
case 6: GOTO_SCREEN(InterfaceSoundsScreen); return true;
|
||||
default:
|
||||
@ -191,7 +197,9 @@ void InterfaceSettingsScreen::failSafeSettings() {
|
||||
}
|
||||
|
||||
void InterfaceSettingsScreen::defaultSettings() {
|
||||
LockScreen::passcode = 0;
|
||||
#ifdef FTDI_LOCK_SCREEN
|
||||
LockScreen::passcode = 0;
|
||||
#endif
|
||||
SoundPlayer::set_volume(255);
|
||||
CLCD::set_brightness(255);
|
||||
UIData::reset_persistent_data();
|
||||
@ -210,7 +218,11 @@ void InterfaceSettingsScreen::saveSettings(char *buff) {
|
||||
|
||||
persistent_data_t eeprom;
|
||||
|
||||
eeprom.passcode = LockScreen::passcode;
|
||||
#ifdef FTDI_LOCK_SCREEN
|
||||
eeprom.passcode = LockScreen::passcode;
|
||||
#else
|
||||
eeprom.passcode = 0;
|
||||
#endif
|
||||
eeprom.sound_volume = SoundPlayer::get_volume();
|
||||
eeprom.display_brightness = CLCD::get_brightness();
|
||||
eeprom.bit_flags = UIData::get_persistent_data();
|
||||
@ -239,7 +251,9 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
|
||||
|
||||
SERIAL_ECHOLNPGM("Loading setting from EEPROM");
|
||||
|
||||
LockScreen::passcode = eeprom.passcode;
|
||||
#ifdef FTDI_LOCK_SCREEN
|
||||
LockScreen::passcode = eeprom.passcode;
|
||||
#endif
|
||||
SoundPlayer::set_volume(eeprom.sound_volume);
|
||||
UIData::set_persistent_data(eeprom.bit_flags);
|
||||
CLCD::set_brightness(eeprom.display_brightness);
|
||||
|
224
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h
Normal file
224
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/screens.h
Normal file
@ -0,0 +1,224 @@
|
||||
/*************
|
||||
* screens.h *
|
||||
*************/
|
||||
|
||||
/****************************************************************************
|
||||
* Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
|
||||
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation, either version 3 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* To view a copy of the GNU General Public License, go to the following *
|
||||
* location: <https://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
// is done using the CLCD::DLCache class, which takes a unique ID for each
|
||||
// cache location. These IDs are defined here:
|
||||
|
||||
enum {
|
||||
STATUS_SCREEN_CACHE,
|
||||
MENU_SCREEN_CACHE,
|
||||
TUNE_SCREEN_CACHE,
|
||||
ALERT_BOX_CACHE,
|
||||
SPINNER_CACHE,
|
||||
ADVANCED_SETTINGS_SCREEN_CACHE,
|
||||
MOVE_AXIS_SCREEN_CACHE,
|
||||
TEMPERATURE_SCREEN_CACHE,
|
||||
STEPS_SCREEN_CACHE,
|
||||
MAX_FEEDRATE_SCREEN_CACHE,
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
FLOW_PERCENT_SCREEN_CACHE,
|
||||
#if HAS_LEVELING
|
||||
LEVELING_SCREEN_CACHE,
|
||||
#if HAS_BED_PROBE
|
||||
ZOFFSET_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
BED_MESH_VIEW_SCREEN_CACHE,
|
||||
BED_MESH_EDIT_SCREEN_CACHE,
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
ADJUST_OFFSETS_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
STEPPER_CURRENT_SCREEN_CACHE,
|
||||
STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND
|
||||
NOZZLE_OFFSET_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
BACKLASH_COMPENSATION_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
JUNC_DEV_SCREEN_CACHE,
|
||||
#else
|
||||
JERK_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
CASE_LIGHT_SCREEN_CACHE,
|
||||
#endif
|
||||
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_MENU_CACHE,
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
LINEAR_ADVANCE_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_RUNOUT_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(SDSUPPORT)
|
||||
FILES_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
CUSTOM_USER_MENUS_SCREEN_CACHE,
|
||||
#endif
|
||||
CHANGE_FILAMENT_SCREEN_CACHE,
|
||||
INTERFACE_SETTINGS_SCREEN_CACHE,
|
||||
INTERFACE_SOUNDS_SCREEN_CACHE,
|
||||
LOCK_SCREEN_CACHE,
|
||||
DISPLAY_TIMINGS_SCREEN_CACHE
|
||||
};
|
||||
|
||||
// To save MCU RAM, the status message is "baked" in to the status screen
|
||||
// cache, so we reserve a large chunk of memory for the DL cache
|
||||
|
||||
#define STATUS_SCREEN_DL_SIZE 4096
|
||||
#define ALERT_BOX_DL_SIZE 3072
|
||||
#define SPINNER_DL_SIZE 3072
|
||||
#define FILE_SCREEN_DL_SIZE 4160
|
||||
#define PRINTING_SCREEN_DL_SIZE 2048
|
||||
|
||||
/************************* MENU SCREEN DECLARATIONS *************************/
|
||||
|
||||
#include "base_screen.h"
|
||||
#include "base_numeric_adjustment_screen.h"
|
||||
#include "dialog_box_base_class.h"
|
||||
#include "status_screen.h"
|
||||
#include "main_menu.h"
|
||||
#include "advanced_settings_menu.h"
|
||||
#include "tune_menu.h"
|
||||
#include "boot_screen.h"
|
||||
#include "about_screen.h"
|
||||
#include "kill_screen.h"
|
||||
#include "alert_dialog_box.h"
|
||||
#include "spinner_dialog_box.h"
|
||||
#include "restore_failsafe_dialog_box.h"
|
||||
#include "save_settings_dialog_box.h"
|
||||
#include "confirm_start_print_dialog_box.h"
|
||||
#include "confirm_abort_print_dialog_box.h"
|
||||
#include "confirm_user_request_alert_box.h"
|
||||
#include "touch_calibration_screen.h"
|
||||
#include "touch_registers_screen.h"
|
||||
#include "change_filament_screen.h"
|
||||
#include "move_axis_screen.h"
|
||||
#include "steps_screen.h"
|
||||
#include "feedrate_percent_screen.h"
|
||||
#include "max_velocity_screen.h"
|
||||
#include "max_acceleration_screen.h"
|
||||
#include "default_acceleration_screen.h"
|
||||
#include "temperature_screen.h"
|
||||
#include "interface_sounds_screen.h"
|
||||
#include "interface_settings_screen.h"
|
||||
#include "lock_screen.h"
|
||||
#include "endstop_state_screen.h"
|
||||
#include "display_tuning_screen.h"
|
||||
#include "media_player_screen.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#include "statistics_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
#include "stepper_current_screen.h"
|
||||
#include "stepper_bump_sensitivity_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "nozzle_offsets_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#if ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
|
||||
#include "syndaver_level/leveling_menu.h"
|
||||
#else
|
||||
#include "leveling_menu.h"
|
||||
#endif
|
||||
#if HAS_BED_PROBE
|
||||
#include "z_offset_screen.h"
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
#include "bed_mesh_base.h"
|
||||
#include "bed_mesh_view_screen.h"
|
||||
#include "bed_mesh_edit_screen.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
#include "confirm_auto_calibration_dialog_box.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
#include "nudge_nozzle_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
#include "backlash_compensation_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
#include "junction_deviation_screen.h"
|
||||
#else
|
||||
#include "jerk_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
#include "case_light_screen.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
|
||||
#include "filament_menu.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#include "filament_runout_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#include "linear_advance_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "files_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
#include "custom_user_menus.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
|
||||
#include "developer_menu.h"
|
||||
#include "confirm_erase_flash_dialog_box.h"
|
||||
#include "widget_demo_screen.h"
|
||||
#include "stress_test_screen.h"
|
||||
#endif
|
||||
|
||||
#if NUM_LANGUAGES > 1
|
||||
#include "language_menu.h"
|
||||
#endif
|
@ -461,4 +461,14 @@ bool StatusScreen::onTouchEnd(uint8_t tag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void StatusScreen::onMediaInserted() {
|
||||
if (AT_SCREEN(StatusScreen))
|
||||
setStatusMessage(GET_TEXT_F(MSG_MEDIA_INSERTED));
|
||||
}
|
||||
|
||||
void StatusScreen::onMediaRemoved() {
|
||||
if (AT_SCREEN(StatusScreen) || ExtUI::isPrintingFromMedia())
|
||||
setStatusMessage(GET_TEXT_F(MSG_MEDIA_REMOVED));
|
||||
}
|
||||
|
||||
#endif // FTDI_STATUS_SCREEN
|
||||
|
@ -42,4 +42,6 @@ class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,
|
||||
static void onEntry();
|
||||
static void onIdle();
|
||||
static bool onTouchEnd(uint8_t tag);
|
||||
static void onMediaInserted();
|
||||
static void onMediaRemoved();
|
||||
};
|
||||
|
@ -37,240 +37,14 @@
|
||||
|
||||
extern tiny_timer_t refresh_timer;
|
||||
|
||||
/********************************* DL CACHE SLOTS ******************************/
|
||||
|
||||
// In order to reduce SPI traffic, we cache display lists (DL) in RAMG. This
|
||||
// is done using the CLCD::DLCache class, which takes a unique ID for each
|
||||
// cache location. These IDs are defined here:
|
||||
|
||||
enum {
|
||||
STATUS_SCREEN_CACHE,
|
||||
MENU_SCREEN_CACHE,
|
||||
TUNE_SCREEN_CACHE,
|
||||
ALERT_BOX_CACHE,
|
||||
SPINNER_CACHE,
|
||||
ADVANCED_SETTINGS_SCREEN_CACHE,
|
||||
MOVE_AXIS_SCREEN_CACHE,
|
||||
TEMPERATURE_SCREEN_CACHE,
|
||||
STEPS_SCREEN_CACHE,
|
||||
MAX_FEEDRATE_SCREEN_CACHE,
|
||||
MAX_VELOCITY_SCREEN_CACHE,
|
||||
MAX_ACCELERATION_SCREEN_CACHE,
|
||||
DEFAULT_ACCELERATION_SCREEN_CACHE,
|
||||
FLOW_PERCENT_SCREEN_CACHE,
|
||||
#if HAS_LEVELING
|
||||
LEVELING_SCREEN_CACHE,
|
||||
#if HAS_BED_PROBE
|
||||
ZOFFSET_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
BED_MESH_VIEW_SCREEN_CACHE,
|
||||
BED_MESH_EDIT_SCREEN_CACHE,
|
||||
#endif
|
||||
#endif
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
ADJUST_OFFSETS_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
STEPPER_CURRENT_SCREEN_CACHE,
|
||||
STEPPER_BUMP_SENSITIVITY_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_MULTI_HOTEND
|
||||
NOZZLE_OFFSET_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
BACKLASH_COMPENSATION_SCREEN_CACHE,
|
||||
#endif
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
JUNC_DEV_SCREEN_CACHE,
|
||||
#else
|
||||
JERK_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
CASE_LIGHT_SCREEN_CACHE,
|
||||
#endif
|
||||
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_MENU_CACHE,
|
||||
#endif
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
LINEAR_ADVANCE_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
FILAMENT_RUNOUT_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(TOUCH_UI_LULZBOT_BIO)
|
||||
PRINTING_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(TOUCH_UI_COCOA_PRESS)
|
||||
PREHEAT_MENU_CACHE,
|
||||
PREHEAT_TIMER_SCREEN_CACHE,
|
||||
LOAD_CHOCOLATE_SCREEN_CACHE,
|
||||
MOVE_XYZ_SCREEN_CACHE,
|
||||
MOVE_E_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(SDSUPPORT)
|
||||
FILES_SCREEN_CACHE,
|
||||
#endif
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
CUSTOM_USER_MENUS_SCREEN_CACHE,
|
||||
#endif
|
||||
CHANGE_FILAMENT_SCREEN_CACHE,
|
||||
INTERFACE_SETTINGS_SCREEN_CACHE,
|
||||
INTERFACE_SOUNDS_SCREEN_CACHE,
|
||||
LOCK_SCREEN_CACHE,
|
||||
DISPLAY_TIMINGS_SCREEN_CACHE
|
||||
};
|
||||
|
||||
// To save MCU RAM, the status message is "baked" in to the status screen
|
||||
// cache, so we reserve a large chunk of memory for the DL cache
|
||||
|
||||
#define STATUS_SCREEN_DL_SIZE 4096
|
||||
#define ALERT_BOX_DL_SIZE 3072
|
||||
#define SPINNER_DL_SIZE 3072
|
||||
#define FILE_SCREEN_DL_SIZE 4160
|
||||
#define PRINTING_SCREEN_DL_SIZE 2048
|
||||
|
||||
/************************* MENU SCREEN DECLARATIONS *************************/
|
||||
|
||||
#include "generic/base_screen.h"
|
||||
#include "generic/base_numeric_adjustment_screen.h"
|
||||
#include "generic/dialog_box_base_class.h"
|
||||
|
||||
#if ENABLED(TOUCH_UI_LULZBOT_BIO)
|
||||
#include "bio_status_screen.h"
|
||||
#include "bio_main_menu.h"
|
||||
#include "bio_tune_menu.h"
|
||||
#include "bio_advanced_settings.h"
|
||||
#include "bio_printing_dialog_box.h"
|
||||
#include "bio_confirm_home_xyz.h"
|
||||
#include "bio_confirm_home_e.h"
|
||||
|
||||
#include "bioprinter/screens.h"
|
||||
#elif ENABLED(TOUCH_UI_COCOA_PRESS)
|
||||
#include "generic/move_axis_screen.h"
|
||||
#include "generic/flow_percent_screen.h"
|
||||
#include "generic/tune_menu.h"
|
||||
#include "cocoa_press/status_screen.h"
|
||||
#include "cocoa_press/main_menu.h"
|
||||
#include "cocoa_press/advanced_settings_menu.h"
|
||||
#include "cocoa_press/preheat_menu.h"
|
||||
#include "cocoa_press/preheat_screen.h"
|
||||
#include "cocoa_press/load_chocolate.h"
|
||||
#include "cocoa_press/move_xyz_screen.h"
|
||||
#include "cocoa_press/move_e_screen.h"
|
||||
#include "cocoa_press/leveling_menu.h"
|
||||
|
||||
#include "cocoapress/screens.h"
|
||||
#elif ENABLED(TOUCH_UI_SYNDAVER_LEVEL)
|
||||
#include "syndaver_level/screens.h"
|
||||
#else
|
||||
#include "generic/status_screen.h"
|
||||
#include "generic/main_menu.h"
|
||||
#include "generic/advanced_settings_menu.h"
|
||||
#include "generic/tune_menu.h"
|
||||
#endif
|
||||
|
||||
#include "generic/boot_screen.h"
|
||||
#include "generic/about_screen.h"
|
||||
#include "generic/kill_screen.h"
|
||||
#include "generic/alert_dialog_box.h"
|
||||
#include "generic/spinner_dialog_box.h"
|
||||
#include "generic/restore_failsafe_dialog_box.h"
|
||||
#include "generic/save_settings_dialog_box.h"
|
||||
#include "generic/confirm_start_print_dialog_box.h"
|
||||
#include "generic/confirm_abort_print_dialog_box.h"
|
||||
#include "generic/confirm_user_request_alert_box.h"
|
||||
#include "generic/touch_calibration_screen.h"
|
||||
#include "generic/touch_registers_screen.h"
|
||||
#include "generic/change_filament_screen.h"
|
||||
#include "generic/move_axis_screen.h"
|
||||
#include "generic/steps_screen.h"
|
||||
#include "generic/feedrate_percent_screen.h"
|
||||
#include "generic/max_velocity_screen.h"
|
||||
#include "generic/max_acceleration_screen.h"
|
||||
#include "generic/default_acceleration_screen.h"
|
||||
#include "generic/temperature_screen.h"
|
||||
#include "generic/interface_sounds_screen.h"
|
||||
#include "generic/interface_settings_screen.h"
|
||||
#include "generic/lock_screen.h"
|
||||
#include "generic/endstop_state_screen.h"
|
||||
#include "generic/display_tuning_screen.h"
|
||||
#include "generic/media_player_screen.h"
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
#include "generic/statistics_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_TRINAMIC_CONFIG
|
||||
#include "generic/stepper_current_screen.h"
|
||||
#include "generic/stepper_bump_sensitivity_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_MULTI_HOTEND
|
||||
#include "generic/nozzle_offsets_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#if DISABLED(TOUCH_UI_COCOA_PRESS)
|
||||
#include "generic/leveling_menu.h"
|
||||
#endif
|
||||
#if HAS_BED_PROBE
|
||||
#include "generic/z_offset_screen.h"
|
||||
#endif
|
||||
#if HAS_MESH
|
||||
#include "generic/bed_mesh_base.h"
|
||||
#include "generic/bed_mesh_view_screen.h"
|
||||
#include "generic/bed_mesh_edit_screen.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(CALIBRATION_GCODE)
|
||||
#include "generic/confirm_auto_calibration_dialog_box.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
#include "generic/nudge_nozzle_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(BACKLASH_GCODE)
|
||||
#include "generic/backlash_compensation_screen.h"
|
||||
#endif
|
||||
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
#include "generic/junction_deviation_screen.h"
|
||||
#else
|
||||
#include "generic/jerk_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(CASE_LIGHT_ENABLE)
|
||||
#include "generic/case_light_screen.h"
|
||||
#endif
|
||||
|
||||
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
|
||||
#include "generic/filament_menu.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
||||
#include "generic/filament_runout_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(LIN_ADVANCE)
|
||||
#include "generic/linear_advance_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "generic/files_screen.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(CUSTOM_MENU_MAIN)
|
||||
#include "generic/custom_user_menus.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOUCH_UI_DEVELOPER_MENU)
|
||||
#include "generic/developer_menu.h"
|
||||
#include "generic/confirm_erase_flash_dialog_box.h"
|
||||
#include "generic/widget_demo_screen.h"
|
||||
#include "generic/stress_test_screen.h"
|
||||
#endif
|
||||
|
||||
#if NUM_LANGUAGES > 1
|
||||
#include "generic/language_menu.h"
|
||||
#include "generic/screens.h"
|
||||
#endif
|
||||
|
||||
#endif // TOUCH_UI_FTDI_EVE
|
||||
|
@ -305,7 +305,7 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
float getAxisPosition_mm(const axis_t axis) {
|
||||
return TERN0(JOYSTICK, flags.jogging) ? destination[axis] : current_position[axis];
|
||||
return current_position[axis];
|
||||
}
|
||||
|
||||
float getAxisPosition_mm(const extruder_t extruder) {
|
||||
|
@ -1609,8 +1609,9 @@ void MarlinUI::update() {
|
||||
|
||||
if (status) {
|
||||
if (old_status < 2) {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMediaInserted()); // ExtUI response
|
||||
#if ENABLED(BROWSE_MEDIA_ON_INSERT)
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onMediaInserted();
|
||||
#elif ENABLED(BROWSE_MEDIA_ON_INSERT)
|
||||
clear_menu_history();
|
||||
quick_feedback();
|
||||
goto_screen(MEDIA_MENU_GATEWAY);
|
||||
@ -1621,8 +1622,9 @@ void MarlinUI::update() {
|
||||
}
|
||||
else {
|
||||
if (old_status < 2) {
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMediaRemoved()); // ExtUI response
|
||||
#if PIN_EXISTS(SD_DETECT)
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onMediaRemoved();
|
||||
#elif PIN_EXISTS(SD_DETECT)
|
||||
LCD_MESSAGEPGM(MSG_MEDIA_REMOVED);
|
||||
#if HAS_LCD_MENU
|
||||
if (!defer_return_to_status) return_to_status();
|
||||
|
Loading…
Reference in New Issue
Block a user