Use "mount" as card verb
This commit is contained in:
@ -911,7 +911,7 @@ namespace ExtUI {
|
||||
}
|
||||
|
||||
bool isMediaInserted() {
|
||||
return IFSD(IS_SD_INSERTED() && card.isDetected(), false);
|
||||
return IFSD(IS_SD_INSERTED() && card.isMounted(), false);
|
||||
}
|
||||
|
||||
void pausePrint() {
|
||||
@ -1008,14 +1008,14 @@ void MarlinUI::update() {
|
||||
if (sd_status != last_sd_status) {
|
||||
last_sd_status = sd_status;
|
||||
if (sd_status) {
|
||||
card.initsd();
|
||||
if (card.isDetected())
|
||||
card.mount();
|
||||
if (card.isMounted())
|
||||
ExtUI::onMediaInserted();
|
||||
else
|
||||
ExtUI::onMediaError();
|
||||
}
|
||||
else {
|
||||
const bool ok = card.isDetected();
|
||||
const bool ok = card.isMounted();
|
||||
card.release();
|
||||
if (ok) ExtUI::onMediaRemoved();
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ void process_lcd_s_command(const char* command) {
|
||||
|
||||
case 'L': {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
if (!card.isDetected()) card.initsd();
|
||||
if (!card.isMounted()) card.mount();
|
||||
|
||||
// A more efficient way to do this would be to
|
||||
// implement a callback in the ls_SerialPrint code, but
|
||||
|
@ -101,7 +101,7 @@ void menu_main() {
|
||||
|
||||
const bool busy = IS_SD_PRINTING() || print_job_timer.isRunning()
|
||||
#if ENABLED(SDSUPPORT)
|
||||
, card_detected = card.isDetected()
|
||||
, card_detected = card.isMounted()
|
||||
, card_open = card_detected && card.isFileOpen()
|
||||
#endif
|
||||
;
|
||||
|
@ -34,7 +34,7 @@
|
||||
#if !PIN_EXISTS(SD_DETECT)
|
||||
void lcd_sd_refresh() {
|
||||
encoderTopLine = 0;
|
||||
card.initsd();
|
||||
card.mount();
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -146,7 +146,7 @@ void menu_media() {
|
||||
MENU_ITEM(function, LCD_STR_REFRESH MSG_REFRESH, lcd_sd_refresh);
|
||||
#endif
|
||||
}
|
||||
else if (card.isDetected())
|
||||
else if (card.isMounted())
|
||||
MENU_ITEM(function, LCD_STR_FOLDER "..", lcd_sd_updir);
|
||||
|
||||
if (ui.should_draw()) for (uint16_t i = 0; i < fileCnt; i++) {
|
||||
|
@ -842,7 +842,7 @@ void MarlinUI::update() {
|
||||
|
||||
if (sd_status) {
|
||||
safe_delay(500); // Some boards need a delay to get settled
|
||||
card.initsd();
|
||||
card.mount();
|
||||
if (old_sd_status == 2)
|
||||
card.beginautostart(); // Initial boot
|
||||
else
|
||||
|
Reference in New Issue
Block a user