-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
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] References to "SD card" do not make sense with USB_FLASH_DRIVE_SUPPORT #14946
Comments
Ill throw in my vote in support of the simple verbiage change to media. Its what windows shows nowadays as well. |
Looks good suggestion and trivial change |
how much boards have usb keys support ? |
At minimum the archim2 and SKR Pro, and im sure as 32bit is more stable many more will be popping up. |
Well, technically the Archim 2 does not have external USB flash drive support. The support on our TAZ Pro is provided by the MAX3421E chip via SPI. We've gotten it to work on an 8-bit AVR, but the USB Host Shield library takes up most of the available memory, leaving not very much for Marlin to function properly. |
For the next trick, Attiny!! With that as an SPI addon, it could in theory be added to almost anything so solid reverences to work off of and itll likely start showing up alot more. |
The SKR Pro has a plug for a USB-stick - but no software to support it. So, up to now, there are no Marlin supported boards being able to handle USB-sticks in the wild? |
The SD functionality in Marlin comprises an interface to the SD card physical interface ("Sd2Card.h/cpp") and file system stuff that operates on 512 byte blocks (pretty much everything else in the "sd" directory) The file system stuff works as long as the underlying devices supports 512 byte blocks, which is the case for USB mass storage class devices. So once you have a USB library that implements USB mass storage devices, you can get Marlin to read files off it. For UHS, I replaced the Sd2Card.h/cpp with my own classes that forwarded block access to the UHS library instead of to an SD card. It looks like the SKR Pro is using STM chips. If there is any library or API out there that lets you read and write 512 byte blocks from USB Mass Storage Devices, then it would be relatively straightforward to get Marlin talking to it. |
The following thread may be helpful for anyone wishing to experiment with the current USB functionality: |
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. |
Currently, the following strings mention a "card" and do not make sense when
USB_FLASH_DRIVE_SUPPORT
is enabled:In our firmware, we typically replace references to "cards" or "SD" with "media" since that is a generic term that covers both cards and USB flash drives.
To keep us from having to do this in the future, I would like to create a PR to make the following changes:
For languages other than english, I could change the variable names but leave the existing text the same (translators would have to modify it to use a more generic term later, where applicable).
Anyhow, that's one way to do it. The other way is to define an entirely new set of strings for USB and put
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
where ever the strings are used, but I really think that is more complicated than it needs to be.@thinkyhead: Thoughts?
The text was updated successfully, but these errors were encountered: