autostart_atmillis=0;
autostart_stilltocheck=true; //the sd start is delayed, because otherwise the serial cannot answer fast enought to make contact with the hostsoftware.
+ lastnr=0;
//power to SD reader
#if SDPOWER > -1
SET_OUTPUT(SDPOWER);
if(!cardOK) //fail
return;
}
- static int lastnr=0;
+
char autoname[30];
sprintf(autoname,"auto%i.g",lastnr);
for(int8_t i=0;i<(int)strlen(autoname);i++)
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
- finishAndDisableSteppers();
+ //finishAndDisableSteppers();
+ enquecommand("M84");
}
autotempShutdown();
}
force_lcd_update=false;\r
}\r
\r
-enum {ItemP_exit, ItemP_home, ItemP_origin, ItemP_preheat, ItemP_extrude, ItemP_disstep};\r
+enum {ItemP_exit, ItemP_autostart,ItemP_disstep,ItemP_home, ItemP_origin, ItemP_preheat, ItemP_extrude};\r
\r
//any action must not contain a ',' character anywhere, or this breaks:\r
#define MENUITEM(repaint_action, click_action) \\r
case ItemP_exit:\r
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;\r
break;\r
+ case ItemP_autostart:\r
+ MENUITEM( lcdprintPGM(" Autostart") , BLOCK;card.lastnr=0;card.checkautostart(true);beepshort(); ) ;\r
+ break;\r
+ case ItemP_disstep:\r
+ MENUITEM( lcdprintPGM(" Disable Steppers") , BLOCK;enquecommand("M84");beepshort(); ) ;\r
+ break;\r
case ItemP_home:\r
MENUITEM( lcdprintPGM(" Auto Home") , BLOCK;enquecommand("G28 X-105 Y-105 Z0");beepshort(); ) ;\r
break;\r
case ItemP_extrude:\r
MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;\r
break;\r
- case ItemP_disstep:\r
- MENUITEM( lcdprintPGM(" Disable Steppers") , BLOCK;enquecommand("M84");beepshort(); ) ;\r
- break;\r
+ \r
+ \r
default: \r
break;\r
}\r
line++;\r
}\r
- updateActiveLines(ItemP_disstep,encoderpos);\r
+ updateActiveLines(ItemP_extrude,encoderpos);\r
}\r
\r
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,ItemT_fan};\r