From eb6c992bfb0d98dd5d659de5b13d770028a1feab Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 10 Mar 2020 22:54:07 -0500 Subject: [PATCH] Announce SD file open Requested in #17110 --- Marlin/src/sd/cardreader.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index b2b0d90e96..ee3513ab4f 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -451,10 +451,12 @@ void openFailed(const char * const fname) { void announceOpen(const uint8_t doing, const char * const path) { if (doing) { + PORT_REDIRECT(SERIAL_BOTH); SERIAL_ECHO_START(); SERIAL_ECHOPGM("Now "); serialprintPGM(doing == 1 ? PSTR("doing") : PSTR("fresh")); SERIAL_ECHOLNPAIR(" file: ", path); + PORT_RESTORE(); } } @@ -511,8 +513,11 @@ void CardReader::openFileRead(char * const path, const uint8_t subcall_type/*=0* if (file.open(curDir, fname, O_READ)) { filesize = file.fileSize(); sdpos = 0; + + PORT_REDIRECT(SERIAL_BOTH); SERIAL_ECHOLNPAIR(STR_SD_FILE_OPENED, fname, STR_SD_SIZE, filesize); SERIAL_ECHOLNPGM(STR_SD_FILE_SELECTED); + PORT_RESTORE(); selectFileByName(fname); ui.set_status(longFilename[0] ? longFilename : fname);