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

Compilation error - Marlin-2.1.1 - mks_robin_nano_v3_usb_flash_drive - TFT_LVGL_UI #134

Open
pagabee opened this issue Nov 6, 2022 · 4 comments

Comments

@pagabee
Copy link

pagabee commented Nov 6, 2022

It is not possible to compile the actual version of Marlin (2.1.1 aug 7) with the environment mks_robin_nano_v3_usb_flash_drive and TFT_LVGL_UI.

Marlin\src\lcd\extui\mks_ui\tft_lvgl_configuration.cpp: In function 'void tft_lvgl_init()':
Marlin\src\lcd\extui\mks_ui\tft_lvgl_configuration.cpp:140:77: error: conditional expression between distinct pointer types 'CardReader::sdcard_driver_t*' {aka 'DiskIODriver_SPI_SD*'} and 'DiskIODriver_USBFlash*' lacks a cast
140 | card.changeMedia(IS_SD_INSERTED() ? &card.media_driver_sdcard : &card.media_driver_usbFlash);
| ^~~~~~~~~~~~~~~~~~~~~
*** [.pio\build\mks_robin_nano_v3_usb_flash_drive\src\src\lcd\extui\mks_ui\tft_lvgl_configuration.cpp.o] Error 1

Marlin-2 1 1 issue

@Valera-Zhan
Copy link

Hi.
If the question is still relevant. Required in the file "Marlin\src\lcd\extui\mks_ui\tft_lvgl_configuration.cpp"
replace line 140:

    #if ENABLED(MULTI_VOLUME) && !HAS_SD_HOST_DRIVE
      SET_INPUT_PULLUP(SD_DETECT_PIN);
      map.changing media(IS_SD_INSERTED() ? and memory cards.media_driver_sdcard : &cards.media_driver_usbFlash);
    #endif

with

    #if ENABLED(MULTI_VOLUME) && !HAS_SD_HOST_DRIVE
      SET_INPUT_PULLUP(SD_DETECT_PIN);
      if (read (SD_DETECT_PIN) == Low) in maps.changeMedia(&maps.media_driver_sdcard);
      else card.change the media(&card.media_driver_usb Flash);
    #endif

@pagabee
Copy link
Author

pagabee commented Mar 2, 2023

Thanks for your code!
I will try it.

@menezesfreitas
Copy link

Também estou com o mesmo problema
Captura de Tela 2023-05-09 às 23 21 12

@simpit303
Copy link

simpit303 commented Apr 2, 2024

Dear MKS.
USB problem is still existing on Marlin bugfixed 2.1.x
You can not compile file as mks_robin_nano_v3_usb_flash_drive_msc with USB_FLASH_DRIVE_SUPPORT defined.
When I turn it off compile is going perfect.
Please just help because I would like to use USB Stick and SD Card and be able to connect Pronterface or Cura by USB cable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants