LulzBot Touch UI Followup (#15007)
This commit is contained in:
parent
8c2cfaa907
commit
bd1ced14e7
|
@ -20,8 +20,6 @@
|
|||
* location: <http://www.gnu.org/licenses/>. *
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef LULZBOT_TOUCH_UI
|
||||
|
||||
class SPIFlash {
|
||||
public:
|
||||
static constexpr uint32_t erase_unit_size = 4 * 1024; // Minimum erase unit
|
||||
|
@ -106,5 +104,3 @@ class UIFlashStorage::BootMediaReader {
|
|||
|
||||
static int16_t read(void *obj, void *buffer, const size_t size);
|
||||
};
|
||||
|
||||
#endif // LULZBOT_TOUCH_UI
|
||||
|
|
|
@ -22,8 +22,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../../../../../sd/SdFile.h"
|
||||
#include "../../../../../sd/cardreader.h"
|
||||
#include "../../../../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#include "../../../../../sd/SdFile.h"
|
||||
#include "../../../../../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
class MediaFileReader {
|
||||
private:
|
||||
|
|
|
@ -35,21 +35,13 @@
|
|||
#endif
|
||||
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
// If __MARLIN_FIRMWARE__ exists, then we are being
|
||||
// compiled inside Marlin.
|
||||
#include "pin_mappings.h"
|
||||
// __MARLIN_FIRMWARE__ exists when compiled within Marlin.
|
||||
#include "pin_mappings.h"
|
||||
#else
|
||||
// Messages that are declared in Marlin
|
||||
#define WELCOME_MSG "Printer Ready"
|
||||
#define MSG_SD_INSERTED "Media Inserted"
|
||||
#define MSG_SD_REMOVED "Media Removed"
|
||||
|
||||
// Define macros for compatibility
|
||||
#define EXTENSIBLE_UI
|
||||
#define _CAT(a, ...) a ## __VA_ARGS__
|
||||
#define SWITCH_ENABLED_ 1
|
||||
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
|
||||
#define DISABLED(b) !ENABLED(b)
|
||||
#define WELCOME_MSG "Printer Ready"
|
||||
#define MSG_MEDIA_INSERTED "Media Inserted"
|
||||
#define MSG_MEDIA_REMOVED "Media Removed"
|
||||
|
||||
namespace UI {
|
||||
static inline uint32_t safe_millis() {return millis();};
|
||||
|
|
|
@ -80,9 +80,8 @@
|
|||
// This is a recommended for smaller displays.
|
||||
//#define TOUCH_UI_PASSCODE
|
||||
|
||||
// Define number of seconds after which the menu screens
|
||||
// timeout and returns the user to the status screen
|
||||
//#define LCD_TIMEOUT_TO_STATUS 120
|
||||
// The timeout (in ms) to return to the status screen from sub-menus
|
||||
//#define LCD_TIMEOUT_TO_STATUS 15000
|
||||
|
||||
// Enable this to debug the event framework
|
||||
//#define UI_FRAMEWORK_DEBUG
|
||||
|
|
|
@ -1160,7 +1160,7 @@ void CLCD::default_display_orientation() {
|
|||
cmd.execute();
|
||||
}
|
||||
else {
|
||||
#ifdef TOUCH_UI_INVERTED
|
||||
#if ENABLED(TOUCH_UI_INVERTED)
|
||||
mem_write_32(REG::ROTATE, 1);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -20,13 +20,15 @@
|
|||
#include "../config.h"
|
||||
|
||||
#ifdef __MARLIN_FIRMWARE__
|
||||
// Marlin will define the I/O functions for us
|
||||
|
||||
// Marlin will define the I/O functions for us
|
||||
#if ENABLED(LULZBOT_TOUCH_UI)
|
||||
#define FTDI_BASIC
|
||||
#define FTDI_EXTENDED
|
||||
#endif
|
||||
#else
|
||||
|
||||
#else // !__MARLIN_FIRMWARE__
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#if !defined(CLCD_USE_SOFT_SPI)
|
||||
|
@ -200,6 +202,14 @@
|
|||
|
||||
#define safe_delay delay
|
||||
|
||||
// Define macros for compatibility
|
||||
|
||||
#define _CAT(a, ...) a ## __VA_ARGS__
|
||||
#define SWITCH_ENABLED_ 1
|
||||
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
|
||||
#define DISABLED(b) !ENABLED(b)
|
||||
#define ANY(A,B) ENABLED(A) || ENABLED(B)
|
||||
|
||||
// Remove compiler warning on an unused variable
|
||||
#ifndef UNUSED
|
||||
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
|
||||
|
@ -208,4 +218,5 @@
|
|||
#define UNUSED(x) ((void)(x))
|
||||
#endif
|
||||
#endif
|
||||
#endif //!defined(__MARLIN_FIRMWARE__)
|
||||
|
||||
#endif // !__MARLIN_FIRMWARE__
|
||||
|
|
|
@ -63,7 +63,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t
|
|||
void BaseScreen::onIdle() {
|
||||
#ifdef LCD_TIMEOUT_TO_STATUS
|
||||
const uint32_t elapsed = millis() - last_interaction;
|
||||
if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS) * 1000) {
|
||||
if (elapsed > uint32_t(LCD_TIMEOUT_TO_STATUS)) {
|
||||
reset_menu_timeout();
|
||||
GOTO_SCREEN(StatusScreen);
|
||||
}
|
||||
|
|
|
@ -32,16 +32,10 @@ using namespace ExtUI;
|
|||
|
||||
void EndstopStatesScreen::onEntry() {
|
||||
BaseScreen::onEntry();
|
||||
#ifdef LULZBOT_SET_PROBE_PINS_STATE
|
||||
LULZBOT_SET_PROBE_PINS_STATE(true)
|
||||
#endif
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onExit() {
|
||||
BaseScreen::onExit();
|
||||
#ifdef LULZBOT_SET_PROBE_PINS_STATE
|
||||
LULZBOT_SET_PROBE_PINS_STATE(false)
|
||||
#endif
|
||||
}
|
||||
|
||||
void EndstopStatesScreen::onRedraw(draw_mode_t) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "../archim2-flash/flash_storage.h"
|
||||
|
||||
#if ENABLED(SDSUPPORT) && defined(LULZBOT_MANUAL_USB_STARTUP)
|
||||
#include "../../../../sd/cardreader.h"
|
||||
#include "../../../../../sd/cardreader.h"
|
||||
#endif
|
||||
|
||||
using namespace FTDI;
|
||||
|
|
Loading…
Reference in a new issue