Rename initsd() to mount()
Sync the Prusa firmware with Marlin 2.1 a little bit.
This commit is contained in:
parent
42855f9f13
commit
d94f263843
|
|
@ -1364,7 +1364,7 @@ void setup()
|
||||||
|
|
||||||
// Force SD card update. Otherwise the SD card update is done from loop() on card.checkautostart(false),
|
// Force SD card update. Otherwise the SD card update is done from loop() on card.checkautostart(false),
|
||||||
// but this times out if a blocking dialog is shown in setup().
|
// but this times out if a blocking dialog is shown in setup().
|
||||||
card.initsd();
|
card.mount();
|
||||||
#ifdef DEBUG_SD_SPEED_TEST
|
#ifdef DEBUG_SD_SPEED_TEST
|
||||||
if (card.cardOK)
|
if (card.cardOK)
|
||||||
{
|
{
|
||||||
|
|
@ -5240,7 +5240,7 @@ void process_commands()
|
||||||
### M21 - Init SD card <a href="https://reprap.org/wiki/G-code#M21:_Initialize_SD_card">M21: Initialize SD card</a>
|
### M21 - Init SD card <a href="https://reprap.org/wiki/G-code#M21:_Initialize_SD_card">M21: Initialize SD card</a>
|
||||||
*/
|
*/
|
||||||
case 21:
|
case 21:
|
||||||
card.initsd();
|
card.mount();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ void CardReader::ls(ls_param params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CardReader::initsd(bool doPresort/* = true*/)
|
void CardReader::mount(bool doPresort/* = true*/)
|
||||||
{
|
{
|
||||||
cardOK = false;
|
cardOK = false;
|
||||||
if(root.isOpen())
|
if(root.isOpen())
|
||||||
|
|
@ -616,7 +616,7 @@ void CardReader::checkautostart(bool force)
|
||||||
autostart_stilltocheck = false;
|
autostart_stilltocheck = false;
|
||||||
if(!cardOK)
|
if(!cardOK)
|
||||||
{
|
{
|
||||||
initsd();
|
mount();
|
||||||
if(!cardOK) //fail
|
if(!cardOK) //fail
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public:
|
||||||
inline ls_param(bool LFN, bool timestamp):LFN(LFN), timestamp(timestamp) { }
|
inline ls_param(bool LFN, bool timestamp):LFN(LFN), timestamp(timestamp) { }
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
void initsd(bool doPresort = true);
|
void mount(bool doPresort = true);
|
||||||
void write_command(char *buf);
|
void write_command(char *buf);
|
||||||
void write_command_no_newline(char *buf);
|
void write_command_no_newline(char *buf);
|
||||||
//files auto[0-9].g on the sd card are performed in a row
|
//files auto[0-9].g on the sd card are performed in a row
|
||||||
|
|
|
||||||
|
|
@ -5586,7 +5586,7 @@ static void lcd_control_temperature_menu()
|
||||||
static void lcd_sd_refresh()
|
static void lcd_sd_refresh()
|
||||||
{
|
{
|
||||||
#if SDCARDDETECT == -1
|
#if SDCARDDETECT == -1
|
||||||
card.initsd();
|
card.mount();
|
||||||
#else
|
#else
|
||||||
card.presort();
|
card.presort();
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -7309,7 +7309,7 @@ void menu_lcd_lcdupdate_func(void)
|
||||||
{
|
{
|
||||||
if (!card.cardOK)
|
if (!card.cardOK)
|
||||||
{
|
{
|
||||||
card.initsd(false); //delay the sorting to the sd menu. Otherwise, removing the SD card while sorting will not menu_back()
|
card.mount(false); //delay the sorting to the sd menu. Otherwise, removing the SD card while sorting will not menu_back()
|
||||||
card.presort_flag = true; //force sorting of the SD menu
|
card.presort_flag = true; //force sorting of the SD menu
|
||||||
}
|
}
|
||||||
LCD_MESSAGERPGM(MSG_WELCOME);
|
LCD_MESSAGERPGM(MSG_WELCOME);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue