|
@@ -6131,12 +6131,33 @@ static void menu_action_sdfile(const char* filename, char* longFilename)
|
|
|
for (int i = 0; i < 8; i++) {
|
|
|
eeprom_write_byte((uint8_t*)EEPROM_FILENAME + i, filename[i]);
|
|
|
}
|
|
|
+
|
|
|
+ uint8_t depth = (uint8_t)card.getWorkDirDepth();
|
|
|
+
|
|
|
+ char dir_name[9];
|
|
|
+
|
|
|
+ for (uint8_t i = 0; i < depth; i++) {
|
|
|
+// card.getDirName(dir_name, i + 1);
|
|
|
+ MYSERIAL.println(dir_name);
|
|
|
+ for (int j = 0; j < 8; j++) {
|
|
|
+ eeprom_write_byte((uint8_t*)EEPROM_DIRS + j + 8*i, dir_names[i][j]);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ //MYSERIAL.println(int(depth));
|
|
|
+ eeprom_write_byte((uint8_t*)EEPROM_DIR_DEPTH, depth);
|
|
|
+
|
|
|
enquecommand_P(PSTR("M24"));
|
|
|
lcd_return_to_status();
|
|
|
}
|
|
|
static void menu_action_sddirectory(const char* filename, char* longFilename)
|
|
|
{
|
|
|
MYSERIAL.println(filename);
|
|
|
+
|
|
|
+ uint8_t depth = (uint8_t)card.getWorkDirDepth();
|
|
|
+
|
|
|
+ strcpy(dir_names[depth], filename);
|
|
|
+ MYSERIAL.println(dir_names[depth]);
|
|
|
card.chdir(filename);
|
|
|
encoderPosition = 0;
|
|
|
}
|