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

Robin nano V2, TFT_LVGL_UI parameter adjustment #18500

Merged
merged 67 commits into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
aa595f5
Merge pull request #1 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 11, 2020
d5d325c
Merge pull request #2 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 13, 2020
d8d5c0f
Merge pull request #4 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 14, 2020
a1055dd
Merge pull request #6 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 18, 2020
8b349b1
Merge pull request #7 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 22, 2020
8c42e50
Merge pull request #14 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jun 27, 2020
626ed70
Merge pull request #15 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jul 1, 2020
80a2552
Merge pull request #16 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Jul 2, 2020
caf0c25
Update mks_ui
MKS-Sean Jul 2, 2020
51af5bf
Fix include paths
thinkyhead Jul 3, 2020
084b192
Update draw_eeprom_settings.h
thinkyhead Jul 3, 2020
4fb24ca
Update platformio.ini
thinkyhead Jul 3, 2020
209a05d
Merge branch 'bugfix-2.0.x' into bugfix-2.0.x
thinkyhead Jul 3, 2020
d6eb29a
Clean up code
thinkyhead Jul 3, 2020
85f0dfa
Apply pins formatting
thinkyhead Jul 3, 2020
606d9e2
Use 'ZERO' macro
thinkyhead Jul 3, 2020
ad2c96d
mks_robin_nano35_V2 same as mks_robin_nano35
thinkyhead Jul 3, 2020
325baae
Revert "mks_robin_nano35_V2 same as mks_robin_nano35"
thinkyhead Jul 4, 2020
a504342
Tweak some spacing
thinkyhead Jul 4, 2020
7be8d20
Move, rename, spacing…
thinkyhead Jul 4, 2020
0570e61
More spacing
thinkyhead Jul 4, 2020
55ff5e2
More spacing changes
thinkyhead Jul 5, 2020
928d03e
Keep updated env
thinkyhead Jul 5, 2020
cf62493
Tweak conditions
thinkyhead Jul 5, 2020
50adea7
Reorder spi word read
thinkyhead Jul 5, 2020
454c008
Tweak homed flags
thinkyhead Jul 5, 2020
62c3479
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18500
thinkyhead Jul 7, 2020
99970e5
Fix enqueue and PSTR
thinkyhead Jul 7, 2020
7f0889c
fix typo
rhapsodyv Jul 6, 2020
7d472b9
to avoid define redefinition warnings
rhapsodyv Jul 6, 2020
8d0a2be
to load font file even if it isnt with the LONG_FILENAME fat flag
rhapsodyv Jul 6, 2020
f9536e6
put mks test code in MKS_TEST define if
rhapsodyv Jul 6, 2020
80c32ae
to load the new icons
rhapsodyv Jul 6, 2020
ac56a14
to fix font load on mac, because the mac hidden file
rhapsodyv Jul 6, 2020
6ecb0a6
Load Icons and Fonts from the same folder: assets
rhapsodyv Jul 7, 2020
6aa1976
to load the logo too
rhapsodyv Jul 7, 2020
b1112ac
Merge pull request #18 from rhapsodyv/18500
makerbase-mks Jul 8, 2020
00429be
script to download mks assets and create the assets folder in the bui…
rhapsodyv Jul 9, 2020
1db0861
instructions
rhapsodyv Jul 9, 2020
c1eaec3
Merge pull request #19 from rhapsodyv/download-mks-assets
makerbase-mks Jul 10, 2020
45b38d1
remove the extra script
rhapsodyv Jul 10, 2020
a3d3264
Merge pull request #20 from rhapsodyv/extra_scripts_fix
makerbase-mks Jul 11, 2020
2ebcc2f
Keep the contents of the stepper.cpp file unchanged
MKS-Sean Jul 11, 2020
3e500de
Update Configuration.h
thinkyhead Jul 12, 2020
a3cfa26
Update stepper.cpp
thinkyhead Jul 12, 2020
eb86f3d
sp
thinkyhead Jul 15, 2020
21348e4
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18500
thinkyhead Jul 15, 2020
58de3da
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into mks-bugfix-…
rhapsodyv Jul 23, 2020
0d3dee9
SPI_GRAPHICAL_TFT is a variant of TFT_LVGL_UI, not other lcd
rhapsodyv Jul 23, 2020
8ef749a
script path
rhapsodyv Jul 23, 2020
01ae3cf
restore env:mks_robin_nano35_v2, because nano 2 needs a file named Ro…
rhapsodyv Jul 23, 2020
79076e3
text
rhapsodyv Jul 23, 2020
728e39e
create the paths if not exist
rhapsodyv Jul 24, 2020
e180001
python 2.7 and python 3 compatibility...
rhapsodyv Jul 24, 2020
942a2f8
Merge pull request #21 from rhapsodyv/mks-bugfix-2.0.x
makerbase-mks Jul 24, 2020
e0fbad0
fixes some headers when compiling with TMC
rhapsodyv Jul 24, 2020
3047700
lib name must match the main header, to no get LDF confused
rhapsodyv Jul 25, 2020
4823e2b
Use better defines for TFT_LVGL_UI: SPI and FSMC version
rhapsodyv Jul 25, 2020
d9567bc
Merge pull request #22 from rhapsodyv/header-fixes
makerbase-mks Jul 25, 2020
4dc81cd
Merge pull request #23 from rhapsodyv/tft_lvgl_ui_defines
makerbase-mks Jul 25, 2020
88cdf98
Clean up, fix sanity checks
thinkyhead Jul 25, 2020
e2372a6
Merge remote-tracking branch 'upstream/bugfix-2.0.x' into pr/18500
thinkyhead Jul 25, 2020
547801f
Honest header ordering
thinkyhead Jul 25, 2020
bdf07c3
Update some hyperlinks
thinkyhead Jul 25, 2020
4fe1d46
More header reordering
thinkyhead Jul 25, 2020
dc00847
External header <lvgl.h>
thinkyhead Jul 25, 2020
1dc7b19
Tweak spacing
thinkyhead Jul 25, 2020
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
21 changes: 12 additions & 9 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
//#define CUSTOM_MACHINE_NAME "3D Printer"

// Printer's unique ID, used by some programs to differentiate between machines.
// Choose your own or use a service like http://www.uuidgenerator.net/version4
// Choose your own or use a service like https://www.uuidgenerator.net/version4
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"

// @section extruder
Expand Down Expand Up @@ -2148,20 +2148,23 @@
//
// TFT LVGL UI
//
// Default MKS icons and fonts: https://git.io/JJvzK
// Copy mks_pic and mks_font folders to the root of your SD
// Using default MKS icons and fonts from: https://git.io/JJvzK
// Just copy the `assets` folder from the build directory to the
// root of your SD card, together with the compiled firmware.
//
//#define TFT_LVGL_UI
// Robin nano v1.2 uses FSMC
//
//#define TFT_LVGL_UI_FSMC

// Robin nano v2.0 uses SPI
//
//#define TFT_LVGL_UI_SPI


//=============================================================================
//============================ Other Controllers ============================
//=============================================================================

//
// Robin nano v2.0 SPI touch screen
//
//#define SPI_GRAPHICAL_TFT

//
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
//
Expand Down
6 changes: 3 additions & 3 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
* Set the vendor info the serial USB interface, if changable
* Currently only supported by DUE platform
*/
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
//#define USB_DEVICE_VENDOR_ID 0x0000
//#define USB_DEVICE_PRODUCT_ID 0x0000
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
11 changes: 6 additions & 5 deletions Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@
#include "gcode/parser.h"
#include "gcode/queue.h"

#if ENABLED(TFT_LVGL_UI)
#include "lvgl.h"
#if HAS_TFT_LVGL_UI
#include "lcd/extui/lib/mks_ui/tft_lvgl_configuration.h"
#include "lcd/extui/lib/mks_ui/draw_ui.h"
#include "lcd/extui/lib/mks_ui/mks_hardware_test.h"
#include <lvgl.h>
#endif

#if ENABLED(DWIN_CREALITY_LCD)
Expand Down Expand Up @@ -755,7 +756,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
// Direct Stepping
TERN_(DIRECT_STEPPING, page_manager.write_responses());

#if ENABLED(TFT_LVGL_UI)
#if HAS_TFT_LVGL_UI
LV_TASK_HANDLER();
#endif
}
Expand Down Expand Up @@ -1192,7 +1193,7 @@ void setup() {
SETUP_RUN(page_manager.init());
#endif

#if ENABLED(TFT_LVGL_UI)
#if HAS_TFT_LVGL_UI
if (!card.isMounted()) SETUP_RUN(card.mount()); // Mount SD to load graphics and fonts
SETUP_RUN(tft_lvgl_init());
#endif
Expand Down Expand Up @@ -1229,7 +1230,7 @@ void loop() {

endstops.event_handler();

TERN_(TFT_LVGL_UI, printer_state_polling());
TERN_(HAS_TFT_LVGL_UI, printer_state_polling());

} while (ENABLED(__AVR__)); // Loop forever on slower (AVR) boards
}
49 changes: 25 additions & 24 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,30 +288,31 @@
#define BOARD_MKS_ROBIN 4007 // MKS Robin (STM32F103ZET6)
#define BOARD_MKS_ROBIN_MINI 4008 // MKS Robin Mini (STM32F103VET6)
#define BOARD_MKS_ROBIN_NANO 4009 // MKS Robin Nano (STM32F103VET6)
#define BOARD_MKS_ROBIN_LITE 4010 // MKS Robin Lite/Lite2 (STM32F103RCT6)
#define BOARD_MKS_ROBIN_LITE3 4011 // MKS Robin Lite3 (STM32F103RCT6)
#define BOARD_MKS_ROBIN_PRO 4012 // MKS Robin Pro (STM32F103ZET6)
#define BOARD_BTT_SKR_MINI_V1_1 4013 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_0 4014 // BigTreeTech SKR Mini E3 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_2 4015 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 4016 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4017 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4018 // JGAurora A5S A1 (STM32F103ZET6)
#define BOARD_FYSETC_AIO_II 4019 // FYSETC AIO_II
#define BOARD_FYSETC_CHEETAH 4020 // FYSETC Cheetah
#define BOARD_FYSETC_CHEETAH_V12 4021 // FYSETC Cheetah V1.2
#define BOARD_LONGER3D_LK 4022 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
#define BOARD_GTM32_MINI 4023 // STM32F103VET6 controller
#define BOARD_GTM32_MINI_A30 4024 // STM32F103VET6 controller
#define BOARD_GTM32_REV_B 4025 // STM32F103VET6 controller
#define BOARD_MKS_ROBIN_E3D 4026 // MKS Robin E3D (STM32F103RCT6)
#define BOARD_MKS_ROBIN_E3 4027 // MKS Robin E3 (STM32F103RCT6)
#define BOARD_MALYAN_M300 4028 // STM32F070-based delta
#define BOARD_CCROBOT_MEEB_3DP 4029 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4030 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CHITU3D_V6 4031 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CREALITY_V4 4032 // Creality v4.x (STM32F103RE)
#define BOARD_TRIGORILLA_PRO 4033 // Trigorilla Pro (STM32F103ZET6)
#define BOARD_MKS_ROBIN_NANO_V2 4010 // MKS Robin Nano V2 (STM32F103VET6)
#define BOARD_MKS_ROBIN_LITE 4011 // MKS Robin Lite/Lite2 (STM32F103RCT6)
#define BOARD_MKS_ROBIN_LITE3 4012 // MKS Robin Lite3 (STM32F103RCT6)
#define BOARD_MKS_ROBIN_PRO 4013 // MKS Robin Pro (STM32F103ZET6)
#define BOARD_BTT_SKR_MINI_V1_1 4014 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_0 4015 // BigTreeTech SKR Mini E3 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V1_2 4016 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
#define BOARD_BTT_SKR_MINI_E3_V2_0 4017 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC)
#define BOARD_BTT_SKR_E3_DIP 4018 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
#define BOARD_JGAURORA_A5S_A1 4019 // JGAurora A5S A1 (STM32F103ZET6)
#define BOARD_FYSETC_AIO_II 4020 // FYSETC AIO_II
#define BOARD_FYSETC_CHEETAH 4021 // FYSETC Cheetah
#define BOARD_FYSETC_CHEETAH_V12 4022 // FYSETC Cheetah V1.2
#define BOARD_LONGER3D_LK 4023 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
#define BOARD_GTM32_MINI 4024 // STM32F103VET6 controller
#define BOARD_GTM32_MINI_A30 4025 // STM32F103VET6 controller
#define BOARD_GTM32_REV_B 4026 // STM32F103VET6 controller
#define BOARD_MKS_ROBIN_E3D 4027 // MKS Robin E3D (STM32F103RCT6)
#define BOARD_MKS_ROBIN_E3 4028 // MKS Robin E3 (STM32F103RCT6)
#define BOARD_MALYAN_M300 4029 // STM32F070-based delta
#define BOARD_CCROBOT_MEEB_3DP 4030 // ccrobot-online.com MEEB_3DP (STM32F103RC)
#define BOARD_CHITU3D_V5 4031 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CHITU3D_V6 4032 // Chitu3D TronXY X5SA V5 Board
#define BOARD_CREALITY_V4 4033 // Creality v4.x (STM32F103RE)
#define BOARD_TRIGORILLA_PRO 4034 // Trigorilla Pro (STM32F103ZET6)

//
// ARM Cortex-M4F
Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,17 @@
#define IS_ULTIPANEL
#endif

// LVGL UI, SPI or FSMC
#if EITHER(TFT_LVGL_UI_SPI, TFT_LVGL_UI_FSMC)
#define HAS_TFT_LVGL_UI 1
#endif

// FSMC/SPI TFT Panels
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define DOGLCD
#define IS_ULTIPANEL
#define DELAYED_BACKLIGHT_INIT
#elif ENABLED(SPI_GRAPHICAL_TFT)
#elif ENABLED(TFT_LVGL_UI_SPI)
#define DELAYED_BACKLIGHT_INIT
#endif

Expand Down
8 changes: 6 additions & 2 deletions Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@
#error "POWER_SUPPLY is now obsolete. Please remove it from Configuration.h."
#elif defined(MKS_ROBIN_TFT)
#error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT. Please update your configuration."
#elif defined(TFT_LVGL_UI)
#error "TFT_LVGL_UI is now TFT_LVGL_UI_FSMC. Please update your configuration."
#elif defined(SPI_GRAPHICAL_TFT)
#error "SPI_GRAPHICAL_TFT is now TFT_LVGL_UI_SPI. Please update your configuration."
#elif defined(SDPOWER)
#error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
Expand Down Expand Up @@ -2217,8 +2221,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
+ ENABLED(MALYAN_LCD) \
+ ENABLED(TOUCH_UI_FTDI_EVE) \
+ ENABLED(FSMC_GRAPHICAL_TFT) \
+ ENABLED(TFT_LVGL_UI) \
+ ENABLED(SPI_GRAPHICAL_TFT)
+ ENABLED(TFT_LVGL_UI_FSMC) \
+ ENABLED(TFT_LVGL_UI_SPI)
#error "Please select no more than one LCD controller option."
#endif

Expand Down
Loading