Browse Source

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)
Blair Thompson 13 years ago
parent
commit
f278e1c00f
2 changed files with 17 additions and 5 deletions
  1. 2
    2
      Marlin/pins.h
  2. 15
    3
      Marlin/ultralcd.pde

+ 2
- 2
Marlin/pins.h View File

285
 #define FAN_PIN            4 // IO pin. Buffer needed
285
 #define FAN_PIN            4 // IO pin. Buffer needed
286
 #endif
286
 #endif
287
 #define PS_ON_PIN          12
287
 #define PS_ON_PIN          12
288
-#define KILL_PIN           -1
288
+#define KILL_PIN           31
289
 
289
 
290
 #define HEATER_0_PIN       10   // EXTRUDER 1
290
 #define HEATER_0_PIN       10   // EXTRUDER 1
291
 #if MOTHERBOARD == 33
291
 #if MOTHERBOARD == 33
322
     #define BLEN_B 1
322
     #define BLEN_B 1
323
     #define BLEN_A 0
323
     #define BLEN_A 0
324
     
324
     
325
-    #define SDCARDDETECT 31		// Ramps does not use this port
325
+    #define SDCARDDETECT -1		// Ramps does not use this port
326
     
326
     
327
       //encoder rotation values
327
       //encoder rotation values
328
     #define encrot0 0
328
     #define encrot0 0

+ 15
- 3
Marlin/ultralcd.pde View File

529
      switch(i)
529
      switch(i)
530
       {
530
       {
531
           case ItemAM_exit:
531
           case ItemAM_exit:
532
-          MENUITEM(  lcdprintPGM(" Prepare \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
532
+          MENUITEM(  lcdprintPGM(MSG_PREPARE_ALT)  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
533
           break;
533
           break;
534
           case ItemAM_X:
534
           case ItemAM_X:
535
           {
535
           {
805
       {
805
       {
806
         if(force_lcd_update)
806
         if(force_lcd_update)
807
         {
807
         {
808
-          lcd.setCursor(0,line);lcdprintPGM(" Fan speed:");
808
+          lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
809
           lcd.setCursor(13,line);lcd.print(ftostr3(fanpwm));
809
           lcd.setCursor(13,line);lcd.print(ftostr3(fanpwm));
810
         }
810
         }
811
         
811
         
1890
 //         }
1890
 //         }
1891
 //       }break;
1891
 //       }break;
1892
     case 1:
1892
     case 1:
1893
-      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(); ) ;
1893
+      MENUITEM(  lcd.print(" ");card.getWorkDirName();
1894
+	  if(card.filename[0]=='/') lcdprintPGM(MSG_REFRESH);
1895
+	  else {
1896
+		  lcd.print("\005");
1897
+		  lcd.print(card.filename);
1898
+		  lcd.print("/..");
1899
+			}  ,  
1900
+	BLOCK;
1901
+			if(SDCARDDETECT == -1) card.initsd();
1902
+			card.updir();
1903
+			enforceupdate=true;
1904
+			lineoffset=0;
1905
+			beepshort(); ) ;
1894
       
1906
       
1895
       break;
1907
       break;
1896
     default:
1908
     default:

Loading…
Cancel
Save