|
@@ -132,6 +132,7 @@
|
132
|
132
|
// M908 - Control digital trimpot directly.
|
133
|
133
|
// M350 - Set microstepping mode.
|
134
|
134
|
// M351 - Toggle MS1 MS2 pins directly.
|
|
135
|
+// M928 - Start SD logging (M928 filename.g) - ended by M29
|
135
|
136
|
// M999 - Restart after being stopped by error
|
136
|
137
|
|
137
|
138
|
//Stepper Movement Variables
|
|
@@ -394,7 +395,14 @@ void loop()
|
394
|
395
|
if(strstr_P(cmdbuffer[bufindr], PSTR("M29")) == NULL)
|
395
|
396
|
{
|
396
|
397
|
card.write_command(cmdbuffer[bufindr]);
|
397
|
|
- SERIAL_PROTOCOLLNPGM(MSG_OK);
|
|
398
|
+ if(card.logging)
|
|
399
|
+ {
|
|
400
|
+ process_commands();
|
|
401
|
+ }
|
|
402
|
+ else
|
|
403
|
+ {
|
|
404
|
+ SERIAL_PROTOCOLLNPGM(MSG_OK);
|
|
405
|
+ }
|
398
|
406
|
}
|
399
|
407
|
else
|
400
|
408
|
{
|
|
@@ -949,6 +957,15 @@ void process_commands()
|
949
|
957
|
card.removeFile(strchr_pointer + 4);
|
950
|
958
|
}
|
951
|
959
|
break;
|
|
960
|
+ case 928: //M928 - Start SD write
|
|
961
|
+ starpos = (strchr(strchr_pointer + 5,'*'));
|
|
962
|
+ if(starpos != NULL){
|
|
963
|
+ char* npos = strchr(cmdbuffer[bufindr], 'N');
|
|
964
|
+ strchr_pointer = strchr(npos,' ') + 1;
|
|
965
|
+ *(starpos-1) = '\0';
|
|
966
|
+ }
|
|
967
|
+ card.openLogFile(strchr_pointer+5);
|
|
968
|
+ break;
|
952
|
969
|
|
953
|
970
|
#endif //SDSUPPORT
|
954
|
971
|
|