chiark / gitweb /
-
authorChristian Thalhammer <christian_thalhammer@gmx.at>
Wed, 29 Feb 2012 13:51:15 +0000 (14:51 +0100)
committerChristian Thalhammer <christian_thalhammer@gmx.at>
Wed, 29 Feb 2012 13:51:15 +0000 (14:51 +0100)
Marlin/Marlin.pde

index 7ee07622118a3bef6afafc71afb91c47e91127cc..2ec088ca07899aa87fba9cdae500dd20ef8fff5e 100644 (file)
@@ -714,6 +714,17 @@ void process_commands()
       //processed in write to file routine above
       //card,saving = false;
       break;
+    case 31: //M31 <filename> Delete File 
+       if (card.cardok){
+               card.closefile();
+               if (SdBaseFile::remove(strchr_pointer + 4)){
+                       SERIAL_PROTOCOLLNPGM("File deleted");
+               }
+               else{
+                       SERIAL_PROTOCOLLNPGM("Deletion failed");
+               }       
+       }
+       
 #endif //SDSUPPORT
 
     case 30: //M30 take time since the start of the SD print or an M109 command