fix: M20 F: list binary files without ProUI#27977
Merged
thinkyhead merged 4 commits intoMarlinFirmware:bugfix-2.1.xfrom Aug 14, 2025
Merged
fix: M20 F: list binary files without ProUI#27977thinkyhead merged 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
thinkyhead merged 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
Conversation
This addresses MarlinFirmware#24332. Likely MarlinFirmware#23878 introduced a change, where M20 F listed binary only when DO_LIST_BIN_FILES was set, which in turn was only set indirectly by DWIN_LCD_PROUI. This fix re-enables listing ".BIN"-files when CUSTOM_FIRMWARE_UPLOAD is configured, as documented for M20. ".BIN" files are only listed for M20 F, not in the UI on the printer. Signed-off-by: Hannes Weisbach <[email protected]>
Member
|
I modified |
Member
|
It appears that listing only BIN xor GCODE was our original intent, but this got lost in #23878. I'll revert the behavior and clarify the flag name. |
bsdnomad
pushed a commit
to bsdnomad/Marlin
that referenced
this pull request
Sep 25, 2025
Co-authored-by: Scott Lahteine <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses #24332.
Likely #23878 introduced a change, where M20 F listed binary only when DO_LIST_BIN_FILES was set, which in turn was only set indirectly by DWIN_LCD_PROUI.
This fix re-enables listing ".BIN"-files when CUSTOM_FIRMWARE_UPLOAD is configured, as documented for M20.
".BIN" files are only listed for M20 F, not in the UI on the printer. Which, from my interpretation of #23878 (comment), is the desired behaviour.
Description
CardReader::is_visible_entity()decides if a directory entry will be displayed/listed or not. If an entry is considered a binary file or not is stored incard_flags_t::filenameIsBin. However,card_flags_t::filenameIsBinused to exist only, ifDO_LIST_BIN_FILESwas set. At the same timeDO_LIST_BIN_FILESalso guards reading from and writing tocard_flags_t::filenameIsBininCardReader::fileIsBinary()andCardReader::setBinFlag().The documentation for M20 says that with
CUSTOM_FIRMWARE_UPLOADM20 Fbecomes available to listBINfiles. This is not what the code does.First, the preprocessor directives had to be changed to
DO_LIST_BIN_FILES || ENABLED(CUSTOM_FIRMWARE_UPLOAD), to enable storing of thefilenameIsBincard flag.Additionally, setting the flag in
is_visble_entity()viasetBinFlaghas to depend on the parameteronlyBin, to listBINfiles only forM20 F, but not when constructing a file list for the graphical UI.Maybe it's a better idea to have
DWIN_LCD_PROUIimplyCUSTOM_SOFTWARE_UPLOAD, but I don't know the config/Marlin well enough to decide, so I went with the uglier, but safer option.Requirements
Reproduction:
CUSTOM_FIRMWARE_UPLOADconfigDWIN_LCD_PROUIconfig disabled/not setBINfile on SD cardM20 Fwill not showBINfileWith this patch:
M20 Fwill listBINfilesBINfiles (in contrast to the solution mentioned in [BUG] Binary files not listed with M20 without E3V2 ProUI #24332)Benefits
M20 Fbehaves according to specification for all board/configs; not only whenDWIN_LCD_PROUIis set.Configurations
Minimal Config (probably):
SD_SUPPORTBINARY_FILE_TRANSFERCUSTOM_FIRMWARE_UPLOADconfig.zip
Related Issues
This aims to fix #24332