Skip to content

Commit

Permalink
misc. updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 28, 2023
1 parent 5867690 commit 9161048
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 66 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ void DGUSRxHandler::Home(DGUS_VP &vp, void *data_ptr) {
DGUS_Data::Axis axis = (DGUS_Data::Axis)((uint8_t*)data_ptr)[1];

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(DGUS_MSG_HOMING), 2);
dgus_screen_handler.SetMessageLine(GET_TEXT_F(DGUS_MSG_HOMING), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(dgus_screen_handler.GetCurrentScreen());
Expand Down Expand Up @@ -760,7 +760,7 @@ void DGUSRxHandler::GcodeExecute(DGUS_VP &vp, void *data_ptr) {
}

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(MSG_EXECUTING_COMMAND), 2);
dgus_screen_handler.SetMessageLine(GET_TEXT_F(MSG_EXECUTING_COMMAND), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::GCODE);
Expand Down Expand Up @@ -914,7 +914,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) {
snprintf_P(buffer, sizeof(buffer), PSTR("M303C%dE%dS%dU1"), cycles, heater, dgus_screen_handler.pid_temp);

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(MSG_PID_AUTOTUNING), 2);
dgus_screen_handler.SetMessageLine(GET_TEXT_F(MSG_PID_AUTOTUNING), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::PID);
Expand Down
27 changes: 10 additions & 17 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ bool DGUSScreenHandler::leveling_active = false;
millis_t DGUSScreenHandler::status_expire = 0;
millis_t DGUSScreenHandler::eeprom_save = 0;

const char DGUS_MSG_HOMING_REQUIRED[] PROGMEM = "Homing required",
DGUS_MSG_BUSY[] PROGMEM = "Busy",
DGUS_MSG_UNDEF[] PROGMEM = "-",
DGUS_MSG_HOMING[] PROGMEM = "Homing...",
DGUS_MSG_FW_OUTDATED[] PROGMEM = "DWIN GUI/OS update required",
DGUS_MSG_ABL_REQUIRED[] PROGMEM = "Auto bed leveling required";

const char DGUS_CMD_HOME[] PROGMEM = "G28",
DGUS_CMD_EEPROM_SAVE[] PROGMEM = "M500";

Expand Down Expand Up @@ -159,25 +152,25 @@ void DGUSScreenHandler::Loop() {
}

void DGUSScreenHandler::PrinterKilled(FSTR_P const error, FSTR_P const component) {
SetMessageLinePGM(FTOP(error), 1);
SetMessageLinePGM(FTOP(component), 2);
SetMessageLine(error, 1);
SetMessageLine(component, 2);
SetMessageLinePGM(NUL_STR, 3);
SetMessageLinePGM(GET_TEXT(MSG_PLEASE_RESET), 4);
SetMessageLine(GET_TEXT_F(MSG_PLEASE_RESET), 4);

dgus_display.PlaySound(3, 1, 200);

MoveToScreen(DGUS_Screen::KILL, true);
}

void DGUSScreenHandler::UserConfirmRequired(const char * const msg) {
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLine(msg, 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
SetMessageLinePGM(NUL_STR, 1);
SetMessageLine(msg, 2);
SetMessageLinePGM(NUL_STR, 3);
SetMessageLinePGM(NUL_STR, 4);

dgus_display.PlaySound(3);

dgus_screen_handler.ShowWaitScreen(current_screen, true);
ShowWaitScreen(current_screen, true);
}

void DGUSScreenHandler::SettingsReset() {
Expand Down Expand Up @@ -347,7 +340,7 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) {

#endif // HAS_PID_HEATING

void DGUSScreenHandler::SetMessageLine(const char* msg, uint8_t line) {
void DGUSScreenHandler::SetMessageLine(const char * const msg, const uint8_t line) {
switch (line) {
default: return;
case 1:
Expand All @@ -365,7 +358,7 @@ void DGUSScreenHandler::SetMessageLine(const char* msg, uint8_t line) {
}
}

void DGUSScreenHandler::SetMessageLinePGM(PGM_P msg, uint8_t line) {
void DGUSScreenHandler::SetMessageLinePGM(PGM_P const msg, const uint8_t line) {
switch (line) {
default: return;
case 1:
Expand Down
12 changes: 3 additions & 9 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ class DGUSScreenHandler {
static void PidTuning(const ExtUI::result_t rst);
#endif

static void SetMessageLine(const char* msg, uint8_t line);
static void SetMessageLinePGM(PGM_P msg, uint8_t line);
static void SetMessageLine(const char * const msg, const uint8_t line);
static void SetMessageLinePGM(PGM_P const msg, const uint8_t line);
static void SetMessageLine(FSTR_P const msg, const uint8_t line) { SetMessageLinePGM(FTOP(msg), line); }

static void SetStatusMessage(const char* msg, const millis_t duration=DGUS_STATUS_EXPIRATION_MS);
static void SetStatusMessage(FSTR_P const msg, const millis_t duration=DGUS_STATUS_EXPIRATION_MS);
Expand Down Expand Up @@ -140,12 +141,5 @@ class DGUSScreenHandler {

extern DGUSScreenHandler dgus_screen_handler;

extern const char DGUS_MSG_HOMING_REQUIRED[],
DGUS_MSG_BUSY[],
DGUS_MSG_UNDEF[],
DGUS_MSG_HOMING[],
DGUS_MSG_FW_OUTDATED[],
DGUS_MSG_ABL_REQUIRED[];

extern const char DGUS_CMD_HOME[],
DGUS_CMD_EEPROM_SAVE[];
26 changes: 11 additions & 15 deletions Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ bool DGUSSetupHandler::PrintAdjust() {
return false;
}

void ShowWaitScreenMessage(FSTR_P const msg, const DGUS_Screen screen) {
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLine(msg, 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(screen);
}

bool DGUSSetupHandler::LevelingMenu() {
ExtUI::setLevelingActive(dgus_screen_handler.leveling_active);

Expand All @@ -80,11 +88,7 @@ bool DGUSSetupHandler::LevelingMenu() {
return true;
}

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(DGUS_MSG_HOMING), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MENU);
ShowWaitScreenMessage(GET_TEXT_F(DGUS_MSG_HOMING), DGUS_Screen::LEVELING_MENU);

queue.enqueue_now_P(DGUS_CMD_HOME);

Expand All @@ -103,11 +107,7 @@ bool DGUSSetupHandler::LevelingManual() {
return false;
}

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(DGUS_MSG_HOMING), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_MANUAL);
ShowWaitScreenMessage(GET_TEXT_F(DGUS_MSG_HOMING), DGUS_Screen::LEVELING_MANUAL);

queue.enqueue_now_P(DGUS_CMD_HOME);

Expand Down Expand Up @@ -136,11 +136,7 @@ bool DGUSSetupHandler::LevelingOffset() {
return true;
}

dgus_screen_handler.SetMessageLinePGM(NUL_STR, 1);
dgus_screen_handler.SetMessageLinePGM(GET_TEXT(DGUS_MSG_HOMING), 2);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 3);
dgus_screen_handler.SetMessageLinePGM(NUL_STR, 4);
dgus_screen_handler.ShowWaitScreen(DGUS_Screen::LEVELING_OFFSET);
ShowWaitScreenMessage(GET_TEXT_F(DGUS_MSG_HOMING), DGUS_Screen::LEVELING_OFFSET);

queue.enqueue_now_P(DGUS_CMD_HOME);

Expand Down
1 change: 0 additions & 1 deletion Marlin/src/lcd/language/language_an.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1
#define NOT_EXTENDED_ISO10646_1_5X7

namespace Language_an {
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_da.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_da {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
1 change: 0 additions & 1 deletion Marlin/src/lcd/language/language_eu.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1
#define NOT_EXTENDED_ISO10646_1_5X7

namespace Language_eu {
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_fi.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_fi {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_fr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_fr {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/language/language_fr_na.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1
#define NOT_EXTENDED_ISO10646_1_5X7

namespace Language_fr_na {
using namespace Language_en; // Inherit undefined strings from English
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_gl {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
* @ displays an axis name such as XYZUVW, or E for an extruder
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_it {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
1 change: 0 additions & 1 deletion Marlin/src/lcd/language/language_nl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1
#define NOT_EXTENDED_ISO10646_1_5X7

namespace Language_nl {
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_pt.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_pt {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/lcd/language/language_sv.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
* See also https://marlinfw.org/docs/development/lcd_language.html
*/

#define DISPLAY_CHARSET_ISO10646_1

namespace Language_sv {
using namespace Language_en; // Inherit undefined strings from English

Expand Down
8 changes: 4 additions & 4 deletions buildroot/tests/FYSETC_F6
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
set -e

#
# Build with the default configurations
# Build with the default config plus DGUS_LCD_UI FYSETC
#
restore_configs
opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_SERIAL_PORT 1 DGUS_LCD_UI FYSETC
exec_test $1 $2 "FYSETC F6 1.3 with DGUS (FYSETC)" "$3"

#
# Test IA_CREALITY
# Test DGUS_LCD_UI RELOADED
#
restore_configs
opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_SERIAL_PORT 1 DGUS_LCD_UI IA_CREALITY LCD_SCREEN_ROTATE 90
opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_SERIAL_PORT 1 DGUS_LCD_UI RELOADED LCD_SCREEN_ROTATE 90
opt_enable ADVANCED_PAUSE_FEATURE LCD_BED_TRAMMING CLASSIC_JERK BABYSTEPPING AUTO_BED_LEVELING_BILINEAR NOZZLE_PARK_FEATURE PROBE_MANUALLY
exec_test $1 $2 "FYSETC F6 1.3 with DGUS (IA_CREALITY)" "$3"
exec_test $1 $2 "FYSETC F6 1.3 with DGUS (RELOADED)" "$3"

#
# Delta Config (generic) + UBL + ALLEN_KEY + EEPROM_SETTINGS + OLED_PANEL_TINYBOY2
Expand Down

0 comments on commit 9161048

Please sign in to comment.