Misc patches preceding DGUS PR

This commit is contained in:
Scott Lahteine 2020-01-02 17:59:06 -06:00
parent c75b560604
commit 5b75a018b7
23 changed files with 100 additions and 103 deletions

View file

@ -91,19 +91,19 @@ typedef int8_t pin_t;
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#else #else
#if !WITHIN(SERIAL_PORT, -1, 3) #if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3" #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif #endif
#define MYSERIAL0 customizedSerial1 #define MYSERIAL0 customizedSerial1
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3) #if !WITHIN(SERIAL_PORT_2, -1, 3)
#error "SERIAL_PORT_2 must be from -1 to 3" #error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT #elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT" #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#endif #endif
#define NUM_SERIAL 2
#define MYSERIAL1 customizedSerial2 #define MYSERIAL1 customizedSerial2
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -56,8 +56,7 @@
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == SERIAL_PORT #if SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration." #error "SERIAL_PORT_2 must be different from SERIAL_PORT. Please update your configuration."
#endif #elif SERIAL_PORT_2 == -1
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 customizedSerial2 #define MYSERIAL1 customizedSerial2
#elif SERIAL_PORT_2 == 0 #elif SERIAL_PORT_2 == 0
#define MYSERIAL1 Serial #define MYSERIAL1 Serial

View file

@ -48,8 +48,8 @@ extern portMUX_TYPE spinlock;
#define MYSERIAL0 flushableSerial #define MYSERIAL0 flushableSerial
#if ENABLED(WIFISUPPORT) #if ENABLED(WIFISUPPORT)
#define NUM_SERIAL 2
#define MYSERIAL1 webSocketSerial #define MYSERIAL1 webSocketSerial
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -61,10 +61,6 @@ extern "C" volatile uint32_t _millis;
#define ST7920_DELAY_3 DELAY_NS(750) #define ST7920_DELAY_3 DELAY_NS(750)
#endif #endif
#if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3"
#endif
#if SERIAL_PORT == -1 #if SERIAL_PORT == -1
#define MYSERIAL0 UsbSerial #define MYSERIAL0 UsbSerial
#elif SERIAL_PORT == 0 #elif SERIAL_PORT == 0
@ -75,16 +71,14 @@ extern "C" volatile uint32_t _millis;
#define MYSERIAL0 MSerial2 #define MYSERIAL0 MSerial2
#elif SERIAL_PORT == 3 #elif SERIAL_PORT == 3
#define MYSERIAL0 MSerial3 #define MYSERIAL0 MSerial3
#else
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif #endif
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3) #if SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be from -1 to 3" #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT #elif SERIAL_PORT_2 == -1
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
#endif
#define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 UsbSerial #define MYSERIAL1 UsbSerial
#elif SERIAL_PORT_2 == 0 #elif SERIAL_PORT_2 == 0
#define MYSERIAL1 MSerial #define MYSERIAL1 MSerial
@ -94,7 +88,10 @@ extern "C" volatile uint32_t _millis;
#define MYSERIAL1 MSerial2 #define MYSERIAL1 MSerial2
#elif SERIAL_PORT_2 == 3 #elif SERIAL_PORT_2 == 3
#define MYSERIAL1 MSerial3 #define MYSERIAL1 MSerial3
#else
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
#endif #endif
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -33,11 +33,9 @@
#include "MarlinSerial_AGCM4.h" #include "MarlinSerial_AGCM4.h"
// Serial ports // Serial ports
#if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3"
#endif
// MYSERIAL0 required before MarlinSerial includes! // MYSERIAL0 required before MarlinSerial includes!
#if SERIAL_PORT == -1 #if SERIAL_PORT == -1
#define MYSERIAL0 Serial #define MYSERIAL0 Serial
#elif SERIAL_PORT == 0 #elif SERIAL_PORT == 0
@ -46,18 +44,16 @@
#define MYSERIAL0 Serial2 #define MYSERIAL0 Serial2
#elif SERIAL_PORT == 2 #elif SERIAL_PORT == 2
#define MYSERIAL0 Serial3 #define MYSERIAL0 Serial3
#else #elif SERIAL_PORT == 3
#define MYSERIAL0 Serial4 #define MYSERIAL0 Serial4
#else
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif #endif
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 3) #if SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be from -1 to 3" #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT #elif SERIAL_PORT_2 == -1
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
#endif
#define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 Serial #define MYSERIAL1 Serial
#elif SERIAL_PORT_2 == 0 #elif SERIAL_PORT_2 == 0
#define MYSERIAL1 Serial1 #define MYSERIAL1 Serial1
@ -65,9 +61,12 @@
#define MYSERIAL1 Serial2 #define MYSERIAL1 Serial2
#elif SERIAL_PORT_2 == 2 #elif SERIAL_PORT_2 == 2
#define MYSERIAL1 Serial3 #define MYSERIAL1 Serial3
#else #elif SERIAL_PORT_2 == 3
#define MYSERIAL1 Serial4 #define MYSERIAL1 Serial4
#else
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
#endif #endif
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -44,13 +44,8 @@
// ------------------------ // ------------------------
#if SERIAL_PORT == 0 #if SERIAL_PORT == 0
#error "Serial port 0 does not exist" #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
#endif #elif SERIAL_PORT == -1
#if !WITHIN(SERIAL_PORT, -1, 6)
#error "SERIAL_PORT must be from -1 to 6"
#endif
#if SERIAL_PORT == -1
#define MYSERIAL0 SerialUSB #define MYSERIAL0 SerialUSB
#elif SERIAL_PORT == 1 #elif SERIAL_PORT == 1
#define MYSERIAL0 Serial1 #define MYSERIAL0 Serial1
@ -64,20 +59,17 @@
#define MYSERIAL0 Serial5 #define MYSERIAL0 Serial5
#elif SERIAL_PORT == 6 #elif SERIAL_PORT == 6
#define MYSERIAL0 Serial6 #define MYSERIAL0 Serial6
#else
#error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
#endif #endif
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if SERIAL_PORT_2 == 0
#error "Serial port 0 does not exist"
#endif
#if !WITHIN(SERIAL_PORT_2, -1, 6)
#error "SERIAL_PORT_2 must be from -1 to 6"
#elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT"
#endif
#define NUM_SERIAL 2 #define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1 #if SERIAL_PORT_2 == 0
#error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#elif SERIAL_PORT_2 == -1
#define MYSERIAL1 SerialUSB #define MYSERIAL1 SerialUSB
#elif SERIAL_PORT_2 == 1 #elif SERIAL_PORT_2 == 1
#define MYSERIAL1 Serial1 #define MYSERIAL1 Serial1
@ -91,6 +83,8 @@
#define MYSERIAL1 Serial5 #define MYSERIAL1 Serial5
#elif SERIAL_PORT_2 == 6 #elif SERIAL_PORT_2 == 6
#define MYSERIAL1 Serial6 #define MYSERIAL1 Serial6
#else
#error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
#endif #endif
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1

View file

@ -78,13 +78,10 @@
#define MSerial5 Serial4 #define MSerial5 Serial4
#endif #endif
#if !WITHIN(SERIAL_PORT, -1, 5) #if SERIAL_PORT == 0
#error "SERIAL_PORT must be from -1 to 5" #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
#endif #elif SERIAL_PORT == -1
#if SERIAL_PORT == -1
#define MYSERIAL0 UsbSerial #define MYSERIAL0 UsbSerial
#elif SERIAL_PORT == 0
#error "Serial port 0 does not exist"
#elif SERIAL_PORT == 1 #elif SERIAL_PORT == 1
#define MYSERIAL0 MSerial1 #define MYSERIAL0 MSerial1
#elif SERIAL_PORT == 2 #elif SERIAL_PORT == 2
@ -95,19 +92,17 @@
#define MYSERIAL0 MSerial4 #define MYSERIAL0 MSerial4
#elif SERIAL_PORT == 5 #elif SERIAL_PORT == 5
#define MYSERIAL0 MSerial5 #define MYSERIAL0 MSerial5
#else
#error "SERIAL_PORT must be from -1 to 5. Please update your configuration."
#endif #endif
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if !WITHIN(SERIAL_PORT_2, -1, 5) #if SERIAL_PORT_2 == 0
#error "SERIAL_PORT_2 must be from -1 to 5" #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
#elif SERIAL_PORT_2 == SERIAL_PORT #elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT" #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#endif #elif SERIAL_PORT_2 == -1
#define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 UsbSerial #define MYSERIAL1 UsbSerial
#elif SERIAL_PORT_2 == 0
#error "Serial port 0 does not exist"
#elif SERIAL_PORT_2 == 1 #elif SERIAL_PORT_2 == 1
#define MYSERIAL1 MSerial1 #define MYSERIAL1 MSerial1
#elif SERIAL_PORT_2 == 2 #elif SERIAL_PORT_2 == 2
@ -118,7 +113,10 @@
#define MYSERIAL1 MSerial4 #define MYSERIAL1 MSerial4
#elif SERIAL_PORT_2 == 5 #elif SERIAL_PORT_2 == 5
#define MYSERIAL1 MSerial5 #define MYSERIAL1 MSerial5
#else
#error "SERIAL_PORT_2 must be from -1 to 5. Please update your configuration."
#endif #endif
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -48,13 +48,8 @@
//extern HalSerial usb_serial; //extern HalSerial usb_serial;
#if defined(STM32F4) && SERIAL_PORT == 0 #if defined(STM32F4) && SERIAL_PORT == 0
#error "Serial port 0 does not exist" #error "SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
#endif #elif SERIAL_PORT == -1
#if !WITHIN(SERIAL_PORT, -1, 6)
#error "SERIAL_PORT must be from -1 to 6"
#endif
#if SERIAL_PORT == -1
#define MYSERIAL0 SerialUSB #define MYSERIAL0 SerialUSB
#elif SERIAL_PORT == 1 #elif SERIAL_PORT == 1
#define MYSERIAL0 SerialUART1 #define MYSERIAL0 SerialUART1
@ -68,19 +63,16 @@
#define MYSERIAL0 SerialUART5 #define MYSERIAL0 SerialUART5
#elif SERIAL_PORT == 6 #elif SERIAL_PORT == 6
#define MYSERIAL0 SerialUART6 #define MYSERIAL0 SerialUART6
#else
#error "SERIAL_PORT must be from -1 to 6. Please update your configuration."
#endif #endif
#ifdef SERIAL_PORT_2 #ifdef SERIAL_PORT_2
#if defined(STM32F4) && SERIAL_PORT_2 == 0 #if defined(STM32F4) && SERIAL_PORT_2 == 0
#error "Serial port 0 does not exist" #error "SERIAL_PORT_2 cannot be 0. (Port 0 does not exist.) Please update your configuration."
#endif
#if !WITHIN(SERIAL_PORT_2, -1, 6)
#error "SERIAL_PORT_2 must be from -1 to 6"
#elif SERIAL_PORT_2 == SERIAL_PORT #elif SERIAL_PORT_2 == SERIAL_PORT
#error "SERIAL_PORT_2 must be different than SERIAL_PORT" #error "SERIAL_PORT_2 must be different than SERIAL_PORT. Please update your configuration."
#endif #elif SERIAL_PORT_2 == -1
#define NUM_SERIAL 2
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 SerialUSB #define MYSERIAL1 SerialUSB
#elif SERIAL_PORT_2 == 1 #elif SERIAL_PORT_2 == 1
#define MYSERIAL1 SerialUART1 #define MYSERIAL1 SerialUART1
@ -94,7 +86,10 @@
#define MYSERIAL1 SerialUART5 #define MYSERIAL1 SerialUART5
#elif SERIAL_PORT_2 == 6 #elif SERIAL_PORT_2 == 6
#define MYSERIAL1 SerialUART6 #define MYSERIAL1 SerialUART6
#else
#error "SERIAL_PORT_2 must be from -1 to 6. Please update your configuration."
#endif #endif
#define NUM_SERIAL 2
#else #else
#define NUM_SERIAL 1 #define NUM_SERIAL 1
#endif #endif

View file

@ -164,7 +164,7 @@ typedef struct {
* link register (i.e. not a normal register) and the stack pointer value * link register (i.e. not a normal register) and the stack pointer value
* supplied. * supplied.
* *
* -If the program was compiled with -funwind-tables , it will use them to * -If the program was compiled with -funwind-tables it will use them to
* perform the traceback. Otherwise, brute force will be employed * perform the traceback. Otherwise, brute force will be employed
* -If the program was compiled with -mpoke-function-name, then you will * -If the program was compiled with -mpoke-function-name, then you will
* get function names in the traceback. Otherwise, you will not. * get function names in the traceback. Otherwise, you will not.

View file

@ -912,7 +912,7 @@ void ST7920_Lite_Status_Screen::on_exit() {
ncs(); ncs();
} }
// This is called prior to the KILL screen to // Called prior to the KILL screen to
// clear the screen, preventing a garbled display. // clear the screen, preventing a garbled display.
void ST7920_Lite_Status_Screen::clear_text_buffer() { void ST7920_Lite_Status_Screen::clear_text_buffer() {
cs(); cs();

View file

@ -179,5 +179,5 @@
#else #else
#error Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify "ftdi_eve_boards.h" #error "Unknown or no TOUCH_UI_FTDI_EVE board specified. To add a new board, modify 'ftdi_eve_boards.h'."
#endif #endif

View file

@ -1179,7 +1179,7 @@ void CLCD::default_display_orientation() {
#endif #endif
} }
#elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED) #elif ANY(TOUCH_UI_PORTRAIT, TOUCH_UI_MIRRORED)
#error PORTRAIT or MIRRORED orientation not supported on the FT800 #error "PORTRAIT or MIRRORED orientation not supported on the FT800."
#elif ENABLED(TOUCH_UI_INVERTED) #elif ENABLED(TOUCH_UI_INVERTED)
mem_write_32(REG::ROTATE, 1); mem_write_32(REG::ROTATE, 1);
#endif #endif

View file

@ -124,5 +124,5 @@
} }
#else #else
#error Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify "ftdi_eve_resolutions.h" #error "Unknown or no TOUCH_UI_FTDI_EVE display resolution specified. To add a display resolution, modify 'ftdi_eve_resolutions.h'."
#endif #endif

View file

@ -210,7 +210,9 @@
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b) #define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
#define DISABLED(b) !ENABLED(b) #define DISABLED(b) !ENABLED(b)
#define ANY(A,B) (ENABLED(A) || ENABLED(B)) #define ANY(A,B) (ENABLED(A) || ENABLED(B))
#define EITHER(A,B) (ENABLED(A) || ENABLED(B))
#define BOTH(A,B) (ENABLED(A) && ENABLED(B)) #define BOTH(A,B) (ENABLED(A) && ENABLED(B))
#define NONE(A,B) (DISABLED(A) && DISABLED(B))
// Remove compiler warning on an unused variable // Remove compiler warning on an unused variable
#ifndef UNUSED #ifndef UNUSED

View file

@ -29,7 +29,7 @@
#ifdef CR10_TFT_PINMAP #ifdef CR10_TFT_PINMAP
#ifndef __MARLIN_FIRMWARE__ #ifndef __MARLIN_FIRMWARE__
#error This pin mapping requires Marlin. #error "This pin mapping requires Marlin."
#endif #endif
#define CLCD_USE_SOFT_SPI #define CLCD_USE_SOFT_SPI
@ -49,7 +49,7 @@
#ifdef AO_EXP1_DEPRECATED_PINMAP #ifdef AO_EXP1_DEPRECATED_PINMAP
#ifndef __MARLIN_FIRMWARE__ #ifndef __MARLIN_FIRMWARE__
#error This pin mapping requires Marlin. #error "This pin mapping requires Marlin."
#endif #endif
#define CLCD_MOD_RESET LCD_PINS_D4 #define CLCD_MOD_RESET LCD_PINS_D4
@ -89,7 +89,7 @@
#ifdef AO_EXP1_PINMAP #ifdef AO_EXP1_PINMAP
#ifndef __MARLIN_FIRMWARE__ #ifndef __MARLIN_FIRMWARE__
#error This pin mapping requires Marlin. #error "This pin mapping requires Marlin."
#endif #endif
#define CLCD_MOD_RESET LCD_PINS_ENABLE #define CLCD_MOD_RESET LCD_PINS_ENABLE
@ -134,7 +134,7 @@
#ifdef AO_EXP2_PINMAP #ifdef AO_EXP2_PINMAP
#ifndef __MARLIN_FIRMWARE__ #ifndef __MARLIN_FIRMWARE__
#error This pin mapping requires Marlin. #error "This pin mapping requires Marlin."
#endif #endif
#define CLCD_SPI_CS BTN_EN1 #define CLCD_SPI_CS BTN_EN1

View file

@ -55,7 +55,7 @@ void MainMenu::onRedraw(draw_mode_t what) {
.tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS)) .tag(5).button( BTN_POS(2,2), BTN_SIZE(1,1), GET_TEXT_F(MSG_DISABLE_STEPPERS))
.tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE)) .tag(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
.enabled( .enabled(
#if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
1 1
#endif #endif
) )

View file

@ -232,7 +232,7 @@ class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen<SPINNER_
static void enqueueAndWait_P(const progmem_str message, const progmem_str commands); static void enqueueAndWait_P(const progmem_str message, const progmem_str commands);
}; };
#if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> { class StatusScreen : public BaseScreen, public CachedScreen<STATUS_SCREEN_CACHE,STATUS_SCREEN_DL_SIZE> {
private: private:
static void draw_axis_position(draw_mode_t); static void draw_axis_position(draw_mode_t);

View file

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(TOUCH_UI_FTDI_EVE) && DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) #if ENABLED(TOUCH_UI_FTDI_EVE) && NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
#include "screens.h" #include "screens.h"
#include "screen_data.h" #include "screen_data.h"

View file

@ -75,7 +75,7 @@ namespace Theme {
constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78); constexpr uint32_t gray_color_5 = hsl_to_rgb(accent_hue, gray_sat, 0.78);
constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest constexpr uint32_t gray_color_6 = hsl_to_rgb(accent_hue, gray_sat, 0.91); // Lightest
#if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS) #if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
// Lulzbot TAZ Pro // Lulzbot TAZ Pro
constexpr uint32_t theme_darkest = gray_color_1; constexpr uint32_t theme_darkest = gray_color_1;
constexpr uint32_t theme_dark = gray_color_2; constexpr uint32_t theme_dark = gray_color_2;

View file

@ -34,6 +34,8 @@
#include "extensible_ui/lib/dgus/DGUSDisplay.h" #include "extensible_ui/lib/dgus/DGUSDisplay.h"
#include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h" #include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h"
extern const char NUL_STR[];
namespace ExtUI { namespace ExtUI {
void onStartup() { void onStartup() {
@ -44,15 +46,26 @@ namespace ExtUI {
void onIdle() { ScreenHandler.loop(); } void onIdle() { ScreenHandler.loop(); }
void onPrinterKilled(PGM_P error, PGM_P component) { void onPrinterKilled(PGM_P error, PGM_P component) {
extern const char NUL_STR[];
ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true); ScreenHandler.sendinfoscreen(GET_TEXT(MSG_HALTED), error, NUL_STR, GET_TEXT(MSG_PLEASE_RESET), true, true, true, true);
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL); ScreenHandler.GotoScreen(DGUSLCD_SCREEN_KILL);
while (!ScreenHandler.loop()); // Wait while anything is left to be sent while (!ScreenHandler.loop()); // Wait while anything is left to be sent
} }
void onMediaInserted() { ScreenHandler.SDCardInserted(); } void onMediaInserted() {
void onMediaError() { ScreenHandler.SDCardError(); } #if ENABLED(SDSUPPORT)
void onMediaRemoved() { ScreenHandler.SDCardRemoved(); } ScreenHandler.SDCardInserted();
#endif
}
void onMediaError() {
#if ENABLED(SDSUPPORT)
ScreenHandler.SDCardError();
#endif
}
void onMediaRemoved() {
#if ENABLED(SDSUPPORT)
ScreenHandler.SDCardRemoved();
#endif
}
void onPlayTone(const uint16_t frequency, const uint16_t duration) {} void onPlayTone(const uint16_t frequency, const uint16_t duration) {}
void onPrintTimerStarted() {} void onPrintTimerStarted() {}

View file

@ -60,7 +60,7 @@ namespace ExtUI {
void onFactoryReset() {} void onFactoryReset() {}
void onStoreSettings(char *buff) { void onStoreSettings(char *buff) {
// This is called when saving to EEPROM (i.e. M500). If the ExtUI needs // Called when saving to EEPROM (i.e. M500). If the ExtUI needs
// permanent data to be stored, it can write up to eeprom_data_size bytes // permanent data to be stored, it can write up to eeprom_data_size bytes
// into buff. // into buff.
@ -70,7 +70,7 @@ namespace ExtUI {
} }
void onLoadSettings(const char *buff) { void onLoadSettings(const char *buff) {
// This is called while loading settings from EEPROM. If the ExtUI // Called while loading settings from EEPROM. If the ExtUI
// needs to retrieve data, it should copy up to eeprom_data_size bytes // needs to retrieve data, it should copy up to eeprom_data_size bytes
// from buff // from buff
@ -80,17 +80,17 @@ namespace ExtUI {
} }
void onConfigurationStoreWritten(bool success) { void onConfigurationStoreWritten(bool success) {
// This is called after the entire EEPROM has been written, // Called after the entire EEPROM has been written,
// whether successful or not. // whether successful or not.
} }
void onConfigurationStoreRead(bool success) { void onConfigurationStoreRead(bool success) {
// This is called after the entire EEPROM has been read, // Called after the entire EEPROM has been read,
// whether successful or not. // whether successful or not.
} }
void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) { void onMeshUpdate(const int8_t xpos, const int8_t ypos, const float zval) {
// This is called when any mesh points are updated // Called when any mesh points are updated
} }
} }