Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anycubic Vyper and stock Vyper LCD #25405

Merged
merged 82 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
c843b48
compiles & loads
Bob-the-Kuhn Feb 15, 2023
673ed5a
Update pins_AC_TRI_F1_V1.h
Bob-the-Kuhn Feb 15, 2023
d143879
allow other displays to be selected without error
Bob-the-Kuhn Feb 16, 2023
036f8ae
compiles and mostly works
Bob-the-Kuhn Feb 18, 2023
31129f7
might be the final version
Bob-the-Kuhn Feb 19, 2023
f3c7243
revert config files back to bugfix-2.1.x
Bob-the-Kuhn Feb 19, 2023
8342c5b
back out some unintended changes, formatting fixes
Bob-the-Kuhn Feb 19, 2023
54b715a
Cleanup, ExtUI updates
thinkyhead Feb 19, 2023
d939f53
remove motherboard because it is based on a GD32F103
Bob-the-Kuhn Feb 19, 2023
fb9ebda
finish backing out motherboard
Bob-the-Kuhn Feb 19, 2023
35dc67b
third attempt to restore boards.h
Bob-the-Kuhn Feb 19, 2023
a37d722
Merge 'bugfix-2.1.x' into pr/25405
thinkyhead Feb 19, 2023
eaf4d03
merge followup
thinkyhead Feb 19, 2023
d10ecec
filter build
thinkyhead Feb 19, 2023
0fd26c4
relocate
thinkyhead Feb 19, 2023
51fc445
Add 'onPowerLoss' to ExtUI
thinkyhead Feb 19, 2023
5bda1c5
move ParamInit to onSettingsLoaded
thinkyhead Feb 19, 2023
36cfb5b
Merge branch 'bugfix-2.1.x' into pr/25405
thinkyhead Feb 19, 2023
ac5994f
fix serial port pins conflict
thinkyhead Feb 19, 2023
165924a
put motherboard back in, rename motherboard, fix type, fix compiler w…
Bob-the-Kuhn Feb 19, 2023
d1678f2
remove extra white space in stm32f1.ini
Bob-the-Kuhn Feb 19, 2023
19899b3
fix and clean up
thinkyhead Feb 19, 2023
40dcdf9
LCD_LANGUAGE_2 not used
thinkyhead Feb 19, 2023
2f122fb
hexes
thinkyhead Feb 19, 2023
6f111c5
Very much HAS_DGUS_LCD_CLASSIC
thinkyhead Feb 19, 2023
a3c5371
debug cleanup like #25400
thinkyhead Feb 19, 2023
7b7028e
more debug cleanup
thinkyhead Feb 19, 2023
86e906e
use common DGUSVPVariable.h
thinkyhead Feb 19, 2023
7bf17d8
use common DGUSDisplayDef.h
thinkyhead Feb 19, 2023
76695fb
comment update
thinkyhead Feb 19, 2023
00ce67e
use common DGUSDisplay.h
thinkyhead Feb 19, 2023
bcdd52b
remove ExtUI dupes
thinkyhead Feb 19, 2023
3690da7
reduce comment
thinkyhead Feb 19, 2023
ee68368
serialprintPGM => serial_print_P
thinkyhead Feb 19, 2023
d68cd80
fix compile errors & warnings
Bob-the-Kuhn Feb 19, 2023
d985e48
simpler
thinkyhead Feb 21, 2023
476d7b1
add code to allow PA13 to be used as general purpose I/O
Bob-the-Kuhn Feb 22, 2023
b7bcf16
LED fix, display number format change, fix "not declared" compile issue
Bob-the-Kuhn Feb 24, 2023
3c8d9f2
restore config files (back out board specific test changes)
Bob-the-Kuhn Feb 24, 2023
10e4323
back out more config file changes
Bob-the-Kuhn Feb 24, 2023
857979f
yet another config file back out
Bob-the-Kuhn Feb 24, 2023
0a552db
take unwanted changes off PR
Bob-the-Kuhn Mar 3, 2023
8fc31bf
Delete creality_extui.cpp from this PR (shouldn't be on it)
Bob-the-Kuhn Mar 3, 2023
ed89759
trying to undo screwup - put creality_extui.cpp back
Bob-the-Kuhn Mar 3, 2023
1a7aba4
still trying to remove files from PR
Bob-the-Kuhn Mar 3, 2023
2c7eb95
snapshot of Vyper software
Bob-the-Kuhn Mar 10, 2023
18734bb
missed deleting one unused file
Bob-the-Kuhn Mar 10, 2023
9bf47ea
initial cleanup
thinkyhead Mar 11, 2023
06e50c9
Merge branch 'bugfix-2.1.x' into pr/25405
thinkyhead Mar 11, 2023
ee6c88a
better
thinkyhead Mar 11, 2023
39aea44
ExtUI::onSurviveInKilled
thinkyhead Mar 11, 2023
13c546c
use DEBUG for clarity
thinkyhead Mar 11, 2023
8e2e2c1
bool
thinkyhead Mar 11, 2023
e0a4fce
misc.
thinkyhead Mar 11, 2023
8960fb4
dgus_tft.cpp cleanup
Bob-the-Kuhn Mar 11, 2023
7bbcb07
Merge branch 'bugfix-2.1.x' into pr/25405
thinkyhead Mar 19, 2023
b494014
cleanup
thinkyhead Mar 19, 2023
1c7c6f7
split up displays
thinkyhead Mar 19, 2023
5cc7101
fix board #, disabled features, etc.
thinkyhead Mar 19, 2023
efbb1d0
rename
thinkyhead Mar 19, 2023
76f2308
misc. cleanup
thinkyhead Mar 19, 2023
7b606f8
simplify ChangePageOfTFT
thinkyhead Mar 19, 2023
d312546
dgus_tft.cpp: compile fixes & more debug prints
Bob-the-Kuhn Mar 20, 2023
aa80721
language
thinkyhead Mar 22, 2023
6affc9b
define Z_MIN_PROBE_PIN
thinkyhead Mar 22, 2023
744a40e
Simplify SendValueToTFT
thinkyhead Mar 22, 2023
04a1543
Merge branch 'bugfix-2.1.x' into pr/25405
thinkyhead Mar 22, 2023
8e49acf
Power Loss enable/disable
thinkyhead Mar 22, 2023
57d7001
rename
thinkyhead Mar 22, 2023
e926b1c
PLR handles OUTAGECON_PIN
thinkyhead Mar 22, 2023
f37cc88
fix compile errors & warnings
Bob-the-Kuhn Mar 23, 2023
b01261c
followup
thinkyhead Mar 23, 2023
4a87393
add utility methods
thinkyhead Mar 23, 2023
9a55e9a
injectCommands_P => injectCommands
thinkyhead Mar 23, 2023
6c61726
remove _handle suffix
thinkyhead Mar 23, 2023
c43c7b6
drop unused
thinkyhead Mar 23, 2023
9444f9d
tweak format
thinkyhead Mar 23, 2023
2345842
text color helper
thinkyhead Mar 23, 2023
83a242a
misc. method tweaks
thinkyhead Mar 23, 2023
7a8b506
allow for big endian
thinkyhead Mar 23, 2023
799bf49
smaller types
thinkyhead Mar 23, 2023
ddd34fc
simplify case light
thinkyhead Mar 23, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
followup
  • Loading branch information
thinkyhead committed Mar 23, 2023
commit b01261c7f0d40e76b4abe838af05977a6c8bf81c
2 changes: 1 addition & 1 deletion Marlin/src/inc/Warnings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
* GD32 is not exactly like STM32
*/
#if MB(SOVOL_V131, TRIGORILLA_V006)
#warning "GD32 based controllers may not be fully compatible with Maple Generic STM32F103RE. Please report any issues."
#warning "GD32 based controllers may not be fully compatible with STM32 platforms. Please report any issues."
#endif

/**
Expand Down
34 changes: 13 additions & 21 deletions Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,8 @@ namespace Anycubic {
void DgusTFT::PowerLoss() {
// On: 5A A5 05 82 00 82 00 00
// Off: 5A A5 05 82 00 82 00 64
uint8_t data_buf[] = { 0x5A, 0xA5, 0x05, 0x82, 0x00, 0x82, 0x00, (uint8_t) (recovery.enabled ? 0x00 : 0x64) };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x05, 0x82, 0x00, 0x82, 0x00, uint8_t(recovery.enabled ? 0x00 : 0x64) };
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

void DgusTFT::PowerLossRecovery() {
Expand Down Expand Up @@ -771,36 +771,34 @@ namespace Anycubic {
uint8_t *a_u8 = (uint8_t *)(&address),
*v_u8 = (uint8_t *)(&value);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x05, 0x82, a_u8[1], a_u8[0], v_u8[1], v_u8[0] };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

void DgusTFT::RequestValueFromTFT(uint32_t address) {
uint8_t *p_u8 = (uint8_t *)(&address);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x04, 0x83, p_u8[1], p_u8[0], 0x01 };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

void DgusTFT::SendTxtToTFT(const char *pdata, uint32_t address) {
uint8_t *p_u8 = (uint8_t *)(&address);
uint8_t data_len = strlen(pdata);
uint8_t data_buf[] = { 0x5A, 0xA5, (uint8_t) (data_len + 5), 0x82, p_u8[1], p_u8[0] };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
for (uint8_t i = 0; i < data_len; i++) TFTSer.write(pdata[i]);

uint8_t *p_u8 = (uint8_t *)(&address), data_len = strlen(pdata);
uint8_t data_buf[] = { 0x5A, 0xA5, uint8_t(data_len + 5), 0x82, p_u8[1], p_u8[0] };
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
LOOP_L_N(i, data_len) TFTSer.write(pdata[i]);
TFTSer.write(0xFF); TFTSer.write(0xFF);
}

void DgusTFT::SendColorToTFT(uint32_t color, uint32_t address) {
uint8_t *a_u8 = (uint8_t *)(&address),
*c_u8 = (uint8_t *)(&color);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x05, 0x82, a_u8[1], a_u8[0], c_u8[1], c_u8[0] };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

void DgusTFT::SendReadNumOfTxtToTFT(uint8_t number, uint32_t address) {
uint8_t *p_u8 = (uint8_t *)(&address);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x04, 0x83, p_u8[1], p_u8[0], number };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

void DgusTFT::ChangePageOfTFT(uint32_t page_index, bool no_send/*=false*/) {
Expand Down Expand Up @@ -829,7 +827,7 @@ namespace Anycubic {
if (!no_send) {
uint8_t *p_u8 = (uint8_t *)(&data_temp);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x07, 0x82, 0x00, 0x84, 0x5A, 0x01, p_u8[1], p_u8[0] };
for (uint8_t i = 0; i < COUNT(data_buf); i++) TFTSer.write(data_buf[i]);
LOOP_L_N(i, COUNT(data_buf)) TFTSer.write(data_buf[i]);
}

page_index_last_2 = page_index_last;
Expand All @@ -854,14 +852,8 @@ namespace Anycubic {
void DgusTFT::LcdAudioSet(audio_t audio) {
// On: 5A A5 07 82 00 80 5A 00 00 1A
// Off: 5A A5 07 82 00 80 5A 00 00 12
uint8_t data_buf[20] = { 0x5A, 0xA5, 0x07, 0x82, 0x00, 0x80, 0x5A, 0x00, 0x00 };

if (audio == AUDIO_ON)
data_buf[9] = 0x1A;
else if (audio == AUDIO_OFF)
data_buf[9] = 0x12;

for (uint8_t i = 0; i < 10; i++) TFTSer.write(data_buf[i]);
uint8_t data_buf[] = { 0x5A, 0xA5, 0x07, 0x82, 0x00, 0x80, 0x5A, 0x00, 0x00, uint8_t(audio == AUDIO_ON : 0x1A : 0x12) };
LOOP_L_N(i, 10) TFTSer.write(data_buf[i]);
}

bool DgusTFT::ReadTFTCommand() {
Expand Down
187 changes: 88 additions & 99 deletions Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

#define MAIN_BOARD_FIRMWARE_VER "V2.4.5"


#define DATA_BUF_SIZE 64

/****************** PAGE INDEX***********************/
Expand All @@ -46,7 +45,7 @@
#define PAGE_MOVE (8+PAGE_OFFSET)
#define PAGE_TEMP (9+PAGE_OFFSET)
#define PAGE_SPEED (10+PAGE_OFFSET)
#define PAGE_SYSTEM_CHS_AUDIO_ON (11+PAGE_OFFSET)
#define PAGE_SYSTEM_CHS_AUDIO_ON (11+PAGE_OFFSET)
#define PAGE_WIFI (12+PAGE_OFFSET)
#define PAGE_ABOUT (13+PAGE_OFFSET)
#define PAGE_RECORD (14+PAGE_OFFSET)
Expand Down Expand Up @@ -83,41 +82,41 @@
#define PAGE_CHS_PROBE_PREHEATING (176+PAGE_OFFSET)
#define PAGE_ENG_PROBE_PREHEATING (175+PAGE_OFFSET)

#define PAGE_CHS_HOMING (177+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_BED_HEATER (178+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_BED_NTC (179+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_HOTEND_HEATER (180+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_HOTEND_NTC (181+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ENDSTOP (182+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_X_ENDSTOP (182+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_Y_ENDSTOP (183+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_Z_ENDSTOP (184+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ZL_ENDSTOP (185+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ZR_ENDSTOP (186+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_LEVELING_SENSOR (187+PAGE_OFFSET)
#define PAGE_CHS_LEVELING_FAILED (188+PAGE_OFFSET)

#define PAGE_ENG_HOMING (189+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_BED_HEATER (190+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_BED_NTC (191+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_HOTEND_HEATER (192+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_HOTEND_NTC (193+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ENDSTOP (194+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_X_ENDSTOP (194+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_Y_ENDSTOP (195+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_Z_ENDSTOP (196+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ZL_ENDSTOP (197+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ZR_ENDSTOP (198+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_LEVELING_SENSOR (199+PAGE_OFFSET)
#define PAGE_ENG_LEVELING_FAILED (200+PAGE_OFFSET)

#define PAGE_CHS_PROBE_PRECHECK (201+PAGE_OFFSET)
#define PAGE_CHS_PROBE_PRECHECK_OK (202+PAGE_OFFSET)
#define PAGE_CHS_PROBE_PRECHECK_FAILED (203+PAGE_OFFSET)

#define PAGE_ENG_PROBE_PRECHECK (204+PAGE_OFFSET)
#define PAGE_ENG_PROBE_PRECHECK_OK (205+PAGE_OFFSET)
#define PAGE_ENG_PROBE_PRECHECK_FAILED (206+PAGE_OFFSET)
#define PAGE_CHS_HOMING (177+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_BED_HEATER (178+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_BED_NTC (179+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_HOTEND_HEATER (180+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_HOTEND_NTC (181+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ENDSTOP (182+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_X_ENDSTOP (182+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_Y_ENDSTOP (183+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_Z_ENDSTOP (184+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ZL_ENDSTOP (185+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_ZR_ENDSTOP (186+PAGE_OFFSET)
#define PAGE_CHS_ABNORMAL_LEVELING_SENSOR (187+PAGE_OFFSET)
#define PAGE_CHS_LEVELING_FAILED (188+PAGE_OFFSET)

#define PAGE_ENG_HOMING (189+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_BED_HEATER (190+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_BED_NTC (191+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_HOTEND_HEATER (192+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_HOTEND_NTC (193+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ENDSTOP (194+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_X_ENDSTOP (194+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_Y_ENDSTOP (195+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_Z_ENDSTOP (196+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ZL_ENDSTOP (197+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_ZR_ENDSTOP (198+PAGE_OFFSET)
#define PAGE_ENG_ABNORMAL_LEVELING_SENSOR (199+PAGE_OFFSET)
#define PAGE_ENG_LEVELING_FAILED (200+PAGE_OFFSET)

#define PAGE_CHS_PROBE_PRECHECK (201+PAGE_OFFSET)
#define PAGE_CHS_PROBE_PRECHECK_OK (202+PAGE_OFFSET)
#define PAGE_CHS_PROBE_PRECHECK_FAILED (203+PAGE_OFFSET)

#define PAGE_ENG_PROBE_PRECHECK (204+PAGE_OFFSET)
#define PAGE_ENG_PROBE_PRECHECK_OK (205+PAGE_OFFSET)
#define PAGE_ENG_PROBE_PRECHECK_FAILED (206+PAGE_OFFSET)

/****************** Lcd control **************************/
#define REG_LCD_READY 0x0014
Expand All @@ -130,7 +129,6 @@
#define TXT_MAIN_MESSAGE 0x2060

// FILE TXT

#define TXT_FILE_0 (0x2000+3*0x30)
#define TXT_DISCRIBE_0 0x5000 //DISCRIBE ADDRESS
#define TXT_FILE_1 (0x2000+4*0x30)
Expand All @@ -143,12 +141,12 @@
#define TXT_DISCRIBE_4 0x50C0

// PRINT TXT
#define TXT_PRINT_NAME 0x2000+8*0x30
#define TXT_PRINT_SPEED 0x2000+9*0x30
#define TXT_PRINT_TIME 0x2000+10*0x30
#define TXT_PRINT_PROGRESS 0x2000+11*0x30
#define TXT_PRINT_HOTEND 0x2000+12*0x30
#define TXT_PRINT_BED 0x2000+13*0x30
#define TXT_PRINT_NAME 0x2000+8*0x30
#define TXT_PRINT_SPEED 0x2000+9*0x30
#define TXT_PRINT_TIME 0x2000+10*0x30
#define TXT_PRINT_PROGRESS 0x2000+11*0x30
#define TXT_PRINT_HOTEND 0x2000+12*0x30
#define TXT_PRINT_BED 0x2000+13*0x30

// PRINT ADJUST TXT

Expand Down Expand Up @@ -217,11 +215,11 @@
#define KEY_PgUp 2
#define KEY_pgDn 3
#define KEY_FLASH 4
#define KEY_FILE0 7
#define KEY_FILE1 8
#define KEY_FILE2 9
#define KEY_FILE3 10
#define KEY_FILE4 11
#define KEY_FILE0 7
#define KEY_FILE1 8
#define KEY_FILE2 9
#define KEY_FILE3 10
#define KEY_FILE4 11

#define KEY_CONTINUE 2
#define KEY_PAUSE 2
Expand Down Expand Up @@ -258,7 +256,6 @@
#define KEY_SPEED_HIGHT 16
#define KEY_HOME_ALL 17


#define KEY_TEMP_TO_TOOL 1 //Temperature setting page
#define KEY_BED_ADD 2
#define KEY_BED_DEC 3
Expand All @@ -274,11 +271,6 @@
#define KEY_PRINT_SPEED_DEC 5
#define KEY_SPEED_ENSURE 6






#define KEY_PREPARE_TO_MAIN 1 //PREPARE PAGE TO MAIN
#define KEY_PREPARE_TO_PreLEVE 2
#define KEY_PreLEVE_TO_PREPARE 1
Expand All @@ -303,38 +295,35 @@

// SYSTEM PAGE KEY

#define KEY_SYS_TO_MAIN 1
#define KEY_LANGUAGE 2
#define KEY_SYS_TO_WIFI 3
#define KEY_WIFI_TO_SYS 1

#define KEY_BEEP 4
#define KEY_SYS_TO_ABOUT 5
#define KEY_ABOUT_TO_SYS 1
#define KEY_SYS_TO_MAIN 1
#define KEY_LANGUAGE 2
#define KEY_SYS_TO_WIFI 3
#define KEY_WIFI_TO_SYS 1

#define KEY_SYS_TO_RECORD 6
#define KEY_RECORD_TO_SYS 1
#define KEY_RECORD_PaUp 2
#define KEY_RECORD_PaDn 3
#define KEY_RECORD_FLASH 4
#define KEY_BEEP 4
#define KEY_SYS_TO_ABOUT 5
#define KEY_ABOUT_TO_SYS 1

#define COLOR_RED 0xF800
#define COLOR_BLUE 0x0210
#define KEY_SYS_TO_RECORD 6
#define KEY_RECORD_TO_SYS 1
#define KEY_RECORD_PaUp 2
#define KEY_RECORD_PaDn 3
#define KEY_RECORD_FLASH 4

//#define AUDIO_OFF false
//#define AUDIO_ON true
#define COLOR_RED 0xF800
#define COLOR_BLUE 0x0210

namespace Anycubic {

enum language_t : uint8_t { ENG, CHS };
enum audio_t : bool { AUDIO_OFF, AUDIO_ON };
enum audio_t : bool { AUDIO_OFF, AUDIO_ON };

class DgusTFT;
extern DgusTFT ui;

typedef struct _lcd_info_t {
language_t language;
audio_t audio;
language_t language;
audio_t audio;
} lcd_info_t;

class DgusTFT {
Expand All @@ -346,30 +335,30 @@ namespace Anycubic {
#if HAS_HEATED_BED
static heater_state_t hotbed_state;
#endif
static char panel_command[MAX_CMND_LEN];
static uint8_t command_len;
static char selectedfile[MAX_PATH_LEN];
static file_menu_t file_menu;
static bool data_received;
static uint8_t data_buf[DATA_BUF_SIZE];
static uint8_t data_index;
static uint32_t page_index_last;
static uint32_t page_index_last_2;
static uint8_t message_index;
static uint8_t pop_up_index;
static uint32_t key_index;
static uint32_t key_value;
static uint16_t filenumber;
static uint16_t filepage;
static uint8_t lcd_txtbox_index;
static uint8_t lcd_txtbox_page;
static uint16_t change_color_index;
static uint8_t TFTpausingFlag;
static uint8_t TFTStatusFlag;
static uint8_t TFTresumingflag;
static uint8_t ready;
static int16_t feedrate_back;
static language_t ui_language;
static char panel_command[MAX_CMND_LEN];
static uint8_t command_len;
static char selectedfile[MAX_PATH_LEN];
static file_menu_t file_menu;
static bool data_received;
static uint8_t data_buf[DATA_BUF_SIZE];
static uint8_t data_index;
static uint32_t page_index_last;
static uint32_t page_index_last_2;
static uint8_t message_index;
static uint8_t pop_up_index;
static uint32_t key_index;
static uint32_t key_value;
static uint16_t filenumber;
static uint16_t filepage;
static uint8_t lcd_txtbox_index;
static uint8_t lcd_txtbox_page;
static uint16_t change_color_index;
static uint8_t TFTpausingFlag;
static uint8_t TFTStatusFlag;
static uint8_t TFTresumingflag;
static uint8_t ready;
static int16_t feedrate_back;
static language_t ui_language;

public:
DgusTFT();
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/ia_creality/creality_extui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ namespace ExtUI {
else if (recdat.data[0] == 4) { // Page Up
injectCommands(F("M22\nM21"));
}
else if (recdat.data[0] == 0) { // return to main page
else if (recdat.data[0] == 0) { // return to main page
InforShowStatus = true;
TPShowStatus = false;
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/tft/ui_320x240.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ void MarlinUI::draw_status_screen() {
#else
256, 130
#endif
, menu_main, imgSettings
, menu_main, imgSettings
);
#if ENABLED(SDSUPPORT)
const bool cm = card.isMounted(), pa = printingIsActive();
Expand Down