This is in my opinion a much better way of dealing with SD cards than my previous fix.

Instead of adding a momentary switch to fake the insertion of the card I have modified the ultralcd menu item:

Card Menu -> Refresh

to reinitialise the card providing that the SDCARDDETECT pin has been set to -1 in the pins.h file.  This requires one less switch on the front panel and the refresh menu item is in the most relevent place for a user who wishes to inert a card and then print from it.

It also means that the "Card inserted" messages do not bother the users of these card readers (they dont make sense for users without SCCARDDETECT)
master
Blair Thompson 13 years ago
parent 046a8e0039
commit f278e1c00f

@ -285,7 +285,7 @@
#define FAN_PIN 4 // IO pin. Buffer needed
#endif
#define PS_ON_PIN 12
#define KILL_PIN -1
#define KILL_PIN 31
#define HEATER_0_PIN 10 // EXTRUDER 1
#if MOTHERBOARD == 33
@ -322,7 +322,7 @@
#define BLEN_B 1
#define BLEN_A 0
#define SDCARDDETECT 31 // Ramps does not use this port
#define SDCARDDETECT -1 // Ramps does not use this port
//encoder rotation values
#define encrot0 0

@ -529,7 +529,7 @@ void MainMenu::showAxisMove()
switch(i)
{
case ItemAM_exit:
MENUITEM( lcdprintPGM(" Prepare \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_PREPARE_ALT) , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemAM_X:
{
@ -805,7 +805,7 @@ void MainMenu::showTune()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Fan speed:");
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
lcd.setCursor(13,line);lcd.print(ftostr3(fanpwm));
}
@ -1890,7 +1890,19 @@ void MainMenu::showSD()
// }
// }break;
case 1:
MENUITEM( lcd.print(" ");card.getWorkDirName();if(card.filename[0]=='/') lcdprintPGM(MSG_REFRESH);else {lcd.print("\005");lcd.print(card.filename);lcd.print("/..");} , BLOCK;card.updir();enforceupdate=true;lineoffset=0;beepshort(); ) ;
MENUITEM( lcd.print(" ");card.getWorkDirName();
if(card.filename[0]=='/') lcdprintPGM(MSG_REFRESH);
else {
lcd.print("\005");
lcd.print(card.filename);
lcd.print("/..");
} ,
BLOCK;
if(SDCARDDETECT == -1) card.initsd();
card.updir();
enforceupdate=true;
lineoffset=0;
beepshort(); ) ;
break;
default:

Loading…
Cancel
Save