Browse Source

Announce SD file open

Requested in #17110
Scott Lahteine 4 years ago
parent
commit
eb6c992bfb
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      Marlin/src/sd/cardreader.cpp

+ 5
- 0
Marlin/src/sd/cardreader.cpp View File

@@ -451,10 +451,12 @@ void openFailed(const char * const fname) {
451 451
 
452 452
 void announceOpen(const uint8_t doing, const char * const path) {
453 453
   if (doing) {
454
+    PORT_REDIRECT(SERIAL_BOTH);
454 455
     SERIAL_ECHO_START();
455 456
     SERIAL_ECHOPGM("Now ");
456 457
     serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh"));
457 458
     SERIAL_ECHOLNPAIR(" file: ", path);
459
+    PORT_RESTORE();
458 460
   }
459 461
 }
460 462
 
@@ -511,8 +513,11 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0*
511 513
   if (file.open(curDir, fname, O_READ)) {
512 514
     filesize = file.fileSize();
513 515
     sdpos = 0;
516
+
517
+    PORT_REDIRECT(SERIAL_BOTH);
514 518
     SERIAL_ECHOLNPAIR(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize);
515 519
     SERIAL_ECHOLNPGM(STR_SD_FILE_SELECTED);
520
+    PORT_RESTORE();
516 521
 
517 522
     selectFileByName(fname);
518 523
     ui.set_status(longFilename[0] ? longFilename : fname);

Loading…
Cancel
Save