Skip to content

Commit

Permalink
Merge branch 'LFN_PR' of https://github.com/GHGiampy/Marlin into VFat
Browse files Browse the repository at this point in the history
  • Loading branch information
GHGiampy committed Jan 17, 2022
2 parents f4e8e24 + 5d9a9db commit eac2692
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1529,8 +1529,8 @@
// LCD's font must contain the characters. Check your selected LCD language.
//#define UTF_FILENAME_SUPPORT

// This allows Marlin to create files with long filenames
//#define LONG_FILENAME_WRITE_SUPPORT
// This allows Marlin to create/delete files with long filenames with M28, M30 and Binary Transfer Protocol
#define LONG_FILENAME_WRITE_SUPPORT
// This allows hosts to request long names for files and folders with M33
#define LONG_FILENAME_HOST_SUPPORT
Expand Down
6 changes: 6 additions & 0 deletions Marlin/src/gcode/host/M115.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ void GcodeSuite::M115() {
// LONG_FILENAME_HOST_SUPPORT (M33)
cap_line(F("LONG_FILENAME"), ENABLED(LONG_FILENAME_HOST_SUPPORT));

// LONG_FILENAME_WRITE_SUPPORT (M20, M23, M28, M29, M30, M33, ...)
cap_line(F("LONG_FILENAME_WRITE"), ENABLED(LONG_FILENAME_WRITE_SUPPORT));

// CUSTOM_FIRMWARE_UPLOAD (M20)
cap_line(F("CUSTOM_FIRMWARE_UPLOAD"), ENABLED(CUSTOM_FIRMWARE_UPLOAD));

// EXTENDED_M20 (M20 L)
cap_line(F("EXTENDED_M20"), ENABLED(LONG_FILENAME_HOST_SUPPORT));

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/sd/SdBaseFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1113,8 +1113,8 @@ bool SdBaseFile::openNext(SdBaseFile *dirFile, uint8_t oflag) {
// Check minimal length
if (iFree < 3) {
// Append 4 extra characters
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(1,9) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(1,9) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(0,24) + 'A';
name[iFree++] = random(0,24) + 'A'; name[iFree++] = random(0,24) + 'A';
}
// Append '~cnt' characters
if (iFree > 5) iFree = 5; // Force the append in the last 3 characters of name part
Expand Down

0 comments on commit eac2692

Please sign in to comment.