Procházet zdrojové kódy

simplified M20 with size

Bob-the-Kuhn před 7 roky
rodič
revize
1b12fea0fa
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. 6
    2
      Marlin/cardreader.cpp

+ 6
- 2
Marlin/cardreader.cpp Zobrazit soubor

@@ -74,7 +74,7 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
74 74
  * Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
75 75
  *   LS_Count       - Add +1 to nrFiles for every file within the parent
76 76
  *   LS_GetFilename - Get the filename of the file indexed by nrFiles
77
- *   LS_SerialPrint - Print the full path of each file to serial output
77
+ *   LS_SerialPrint - Print the full path and size of each file to serial output
78 78
  */
79 79
 void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
80 80
   dir_t p;
@@ -133,11 +133,15 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
133 133
         case LS_Count:
134 134
           nrFiles++;
135 135
           break;
136
+
136 137
         case LS_SerialPrint:
137 138
           createFilename(filename, p);
138 139
           SERIAL_PROTOCOL(prepend);
139
-          SERIAL_PROTOCOLLN(filename);
140
+          SERIAL_PROTOCOL(filename);
141
+          SERIAL_PROTOCOLCHAR(' ');
142
+          SERIAL_PROTOCOLLN(p.fileSize);
140 143
           break;
144
+
141 145
         case LS_GetFilename:
142 146
           createFilename(filename, p);
143 147
           if (match != NULL) {

Loading…
Zrušit
Uložit