No 'ls' if media isn't mounted
This commit is contained in:
committed by
Scott Lahteine
parent
d94b5b5ad0
commit
f7cb9455c8
@ -31,9 +31,13 @@
|
||||
* M20: List SD card to serial output
|
||||
*/
|
||||
void GcodeSuite::M20() {
|
||||
SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
|
||||
card.ls();
|
||||
SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
|
||||
if (card.flag.mounted) {
|
||||
SERIAL_ECHOLNPGM(STR_BEGIN_FILE_LIST);
|
||||
card.ls();
|
||||
SERIAL_ECHOLNPGM(STR_END_FILE_LIST);
|
||||
}
|
||||
else
|
||||
SERIAL_ECHO_MSG(STR_NO_MEDIA);
|
||||
}
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
Reference in New Issue
Block a user