Misc patches preceding DGUS PR
This commit is contained in:
@ -912,7 +912,7 @@ void ST7920_Lite_Status_Screen::on_exit() {
|
||||
ncs();
|
||||
}
|
||||
|
||||
// This is called prior to the KILL screen to
|
||||
// Called prior to the KILL screen to
|
||||
// clear the screen, preventing a garbled display.
|
||||
void ST7920_Lite_Status_Screen::clear_text_buffer() {
|
||||
cs();
|
||||
|
@ -74,7 +74,7 @@ static const uint8_t u8g_dev_st7920_128x64_HAL_init_seq[] PROGMEM = {
|
||||
|
||||
0x038, // 8 Bit interface (DL=1), basic instruction set (RE=0)
|
||||
0x00C, // display on, cursor & blink off; 0x08: all off
|
||||
0x006, // Entry mode: Cursor move to right ,DDRAM address counter (AC) plus 1, no shift
|
||||
0x006, // Entry mode: Cursor move to right, DDRAM address counter (AC) plus 1, no shift
|
||||
0x002, // disable scroll, enable CGRAM adress
|
||||
0x001, // clear RAM, needs 1.6 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
|
@ -179,5 +179,5 @@
|
||||
|
||||
#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
|
||||
|
@ -1179,7 +1179,7 @@ void CLCD::default_display_orientation() {
|
||||
#endif
|
||||
}
|
||||
#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)
|
||||
mem_write_32(REG::ROTATE, 1);
|
||||
#endif
|
||||
|
@ -124,5 +124,5 @@
|
||||
}
|
||||
|
||||
#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
|
||||
|
@ -210,7 +210,9 @@
|
||||
#define ENABLED(b) _CAT(SWITCH_ENABLED_, b)
|
||||
#define DISABLED(b) !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 NONE(A,B) (DISABLED(A) && DISABLED(B))
|
||||
|
||||
// Remove compiler warning on an unused variable
|
||||
#ifndef UNUSED
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#ifdef CR10_TFT_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#error "This pin mapping requires Marlin."
|
||||
#endif
|
||||
|
||||
#define CLCD_USE_SOFT_SPI
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
#ifdef AO_EXP1_DEPRECATED_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#error "This pin mapping requires Marlin."
|
||||
#endif
|
||||
|
||||
#define CLCD_MOD_RESET LCD_PINS_D4
|
||||
@ -89,7 +89,7 @@
|
||||
|
||||
#ifdef AO_EXP1_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#error "This pin mapping requires Marlin."
|
||||
#endif
|
||||
|
||||
#define CLCD_MOD_RESET LCD_PINS_ENABLE
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
#ifdef AO_EXP2_PINMAP
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#error This pin mapping requires Marlin.
|
||||
#error "This pin mapping requires Marlin."
|
||||
#endif
|
||||
|
||||
#define CLCD_SPI_CS BTN_EN1
|
||||
|
@ -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(6).button( BTN_POS(1,3), BTN_SIZE(2,1), GET_TEXT_F(MSG_TEMPERATURE))
|
||||
.enabled(
|
||||
#if DISABLED(TOUCH_UI_LULZBOT_BIO) && DISABLED(TOUCH_UI_COCOA_PRESS)
|
||||
#if NONE(TOUCH_UI_LULZBOT_BIO, TOUCH_UI_COCOA_PRESS)
|
||||
1
|
||||
#endif
|
||||
)
|
||||
|
@ -232,7 +232,7 @@ class SpinnerDialogBox : public DialogBoxBaseClass, public CachedScreen<SPINNER_
|
||||
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> {
|
||||
private:
|
||||
static void draw_axis_position(draw_mode_t);
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#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 "screen_data.h"
|
||||
|
@ -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_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
|
||||
constexpr uint32_t theme_darkest = gray_color_1;
|
||||
constexpr uint32_t theme_dark = gray_color_2;
|
||||
|
@ -34,6 +34,8 @@
|
||||
#include "extensible_ui/lib/dgus/DGUSDisplay.h"
|
||||
#include "extensible_ui/lib/dgus/DGUSDisplayDefinition.h"
|
||||
|
||||
extern const char NUL_STR[];
|
||||
|
||||
namespace ExtUI {
|
||||
|
||||
void onStartup() {
|
||||
@ -44,15 +46,26 @@ namespace ExtUI {
|
||||
void onIdle() { ScreenHandler.loop(); }
|
||||
|
||||
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.GotoScreen(DGUSLCD_SCREEN_KILL);
|
||||
while (!ScreenHandler.loop()); // Wait while anything is left to be sent
|
||||
}
|
||||
|
||||
void onMediaInserted() { ScreenHandler.SDCardInserted(); }
|
||||
void onMediaError() { ScreenHandler.SDCardError(); }
|
||||
void onMediaRemoved() { ScreenHandler.SDCardRemoved(); }
|
||||
void onMediaInserted() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
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 onPrintTimerStarted() {}
|
||||
|
@ -60,7 +60,7 @@ namespace ExtUI {
|
||||
void onFactoryReset() {}
|
||||
|
||||
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
|
||||
// into buff.
|
||||
|
||||
@ -70,7 +70,7 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
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
|
||||
// from buff
|
||||
|
||||
@ -80,17 +80,17 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
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.
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user