|
@@ -133,6 +133,7 @@
|
133
|
133
|
// M908 - Control digital trimpot directly.
|
134
|
134
|
// M350 - Set microstepping mode.
|
135
|
135
|
// M351 - Toggle MS1 MS2 pins directly.
|
|
136
|
+// M928 - Start SD logging (M928 filename.g) - ended by M29
|
136
|
137
|
// M999 - Restart after being stopped by error
|
137
|
138
|
|
138
|
139
|
//Stepper Movement Variables
|
|
@@ -403,7 +404,14 @@ void loop()
|
403
|
404
|
if(strstr_P(cmdbuffer[bufindr], PSTR("M29")) == NULL)
|
404
|
405
|
{
|
405
|
406
|
card.write_command(cmdbuffer[bufindr]);
|
406
|
|
- SERIAL_PROTOCOLLNPGM(MSG_OK);
|
|
407
|
+ if(card.logging)
|
|
408
|
+ {
|
|
409
|
+ process_commands();
|
|
410
|
+ }
|
|
411
|
+ else
|
|
412
|
+ {
|
|
413
|
+ SERIAL_PROTOCOLLNPGM(MSG_OK);
|
|
414
|
+ }
|
407
|
415
|
}
|
408
|
416
|
else
|
409
|
417
|
{
|
|
@@ -958,6 +966,15 @@ void process_commands()
|
958
|
966
|
card.removeFile(strchr_pointer + 4);
|
959
|
967
|
}
|
960
|
968
|
break;
|
|
969
|
+ case 928: //M928 - Start SD write
|
|
970
|
+ starpos = (strchr(strchr_pointer + 5,'*'));
|
|
971
|
+ if(starpos != NULL){
|
|
972
|
+ char* npos = strchr(cmdbuffer[bufindr], 'N');
|
|
973
|
+ strchr_pointer = strchr(npos,' ') + 1;
|
|
974
|
+ *(starpos-1) = '\0';
|
|
975
|
+ }
|
|
976
|
+ card.openLogFile(strchr_pointer+5);
|
|
977
|
+ break;
|
961
|
978
|
|
962
|
979
|
#endif //SDSUPPORT
|
963
|
980
|
|