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

[BUG] BOARD_MKS_ROBIN_NANO_V3 and MKS_TS35_V2_0 with TFT_LVGL_UI compile error #22413

Closed
ellensp opened this issue Jul 21, 2021 · 4 comments
Closed

Comments

@ellensp
Copy link
Contributor

ellensp commented Jul 21, 2021

Did you test the latest bugfix-2.0.x code?

Yes, and the problem still exists.

Bug Description

The following fails to compile

#define SERIAL_PORT 3
#define MOTHERBOARD BOARD_MKS_ROBIN_NANO_V3
#define SDSUPPORT
#define MKS_TS35_V2_0
#define TFT_LVGL_UI
#define TOUCH_SCREEN

Bug Timeline

new

Expected behavior

It should compile

Actual behavior

It errors with

Compiling .pio/build/mks_robin_nano_v3/src/src/lcd/extui/mks_ui/gb2312_puhui16.cpp.o
In file included from Marlin/src/lcd/extui/mks_ui/../../../inc/MarlinConfigPre.h:37,
                 from Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp:22:
Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp: In function 'void lv_draw_ready_print()':
Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp:137:24: error: 'mks_test_flag' was not declared in this scope
  137 |   if (TERN0(SDSUPPORT, mks_test_flag == 0x1E)) {

Steps to Reproduce

  1. use provided config
  2. compile
  3. note that it errors

Version of Marlin Firmware

latest bugfix

Electronics

MKS_ROBIN_NANO_V3

Add-ons

MKS_TS35_V2_0

Additional information & file uploads

Configuration.zip

Related to issue: #21069

@ellensp
Copy link
Contributor Author

ellensp commented Jul 21, 2021

The following seems to fix it, but m not confident its the correct thing to do.

diff --git a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp
index 6f24d81b49..78e01842b2 100644
--- a/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp
+++ b/Marlin/src/lcd/extui/mks_ui/draw_ready_print.cpp
@@ -126,7 +126,7 @@ void lv_draw_ready_print() {
   ZERO(disp_state_stack._disp_state);
   scr = lv_screen_create(PRINT_READY_UI, "");

-  if (TERN0(SDSUPPORT, mks_test_flag == 0x1E)) {
+  if (TERN0(MKS_TEST, mks_test_flag == 0x1E)) {
     // Create image buttons
     buttonTool = lv_imgbtn_create(scr, "F:/bmp_tool.bin", event_handler, ID_TOOL);

@ellensp
Copy link
Contributor Author

ellensp commented Jul 21, 2021

Needed more than just this.
PR created

@thisiskeithb
Copy link
Member

#22414 was merged. Closing.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants