merging with SCUBA82

This commit is contained in:
Erik van der Zalm
2012-03-04 13:41:47 +01:00
5 changed files with 116 additions and 31 deletions

View File

@@ -75,7 +75,8 @@
// M27 - Report SD print status
// M28 - Start SD write (M28 filename.g)
// M29 - Stop SD write
// M30 - Output time since last M109 or SD card start to serial
// M30 - Delete file from SD (M30 filename.g)
// M31 - Output time since last M109 or SD card start to serial
// M42 - Change pin status via gcode
// M80 - Turn on Power Supply
// M81 - Turn off Power Supply
@@ -738,9 +739,22 @@ void process_commands()
//processed in write to file routine above
//card,saving = false;
break;
case 30: //M30 <filename> Delete File
if (card.cardOK){
card.closefile();
starpos = (strchr(strchr_pointer + 4,'*'));
if(starpos != NULL){
char* npos = strchr(cmdbuffer[bufindr], 'N');
strchr_pointer = strchr(npos,' ') + 1;
*(starpos-1) = '\0';
}
card.removeFile(strchr_pointer + 4);
}
break;
#endif //SDSUPPORT
case 30: //M30 take time since the start of the SD print or an M109 command
case 31: //M31 take time since the start of the SD print or an M109 command
{
stoptime=millis();
char time[30];