* M34: Media Sorting * * Set Media Sorting Options * * Parameters: * S Sorting Order: * S Default sorting (i.e., SDSORT_REVERSE) * S-1 Reverse alpha sorting * S0 FID Order (not always newest) * S1 Forward alpha sorting * S2 Alias for S-1 [deprecated] * * F Folder Sorting: * F-1 Folders before files * F0 No folder sorting (Sort a
| 46 | * F1 Folders after files |
| 47 | */ |
| 48 | void GcodeSuite::M34() { |
| 49 | if (parser.seen('S')) card.setSortOn(SortFlag(parser.ushortval('S', TERN(SDSORT_REVERSE, AS_REV, AS_FWD)))); |
| 50 | if (parser.seenval('F')) { |
| 51 | const int v = parser.value_long(); |
| 52 | card.setSortFolders(v < 0 ? -1 : v > 0 ? 1 : 0); |
| 53 | } |
| 54 | //if (parser.seen('R')) card.setSortReverse(parser.value_bool()); |
| 55 | } |
| 56 | |
| 57 | #endif // SDCARD_SORT_ALPHA && SDSORT_GCODE |
nothing calls this directly
no test coverage detected