Skip to content

Commit

Permalink
Added : M32 - Select file and start SD print (Can be used when printi…
Browse files Browse the repository at this point in the history
…ng from SD card)

Untested
  • Loading branch information
ErikZalm committed Jul 14, 2013
1 parent c4a2077 commit 461dad6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions Marlin/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
// M29 - Stop SD write
// M30 - Delete file from SD (M30 filename.g)
// M31 - Output time since last M109 or SD card start to serial
// M32 - Select file and start SD print (Can be used when printing from SD card)
// M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
// M80 - Turn on Power Supply
// M81 - Turn off Power Supply
Expand Down Expand Up @@ -1061,6 +1062,19 @@ void process_commands()
card.removeFile(strchr_pointer + 4);
}
break;
case 32: //M32 - Select file and start SD print
if(card.sdprinting) {
st_synchronize();
card.closefile();
card.sdprinting = false;
}
starpos = (strchr(strchr_pointer + 4,'*'));
if(starpos!=NULL)
*(starpos-1)='\0';
card.openFile(strchr_pointer + 4,true);
card.startFileprint();
starttime=millis();
break
case 928: //M928 - Start SD write
starpos = (strchr(strchr_pointer + 5,'*'));
if(starpos != NULL){
Expand Down
1 change: 0 additions & 1 deletion Marlin/cardreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ void CardReader::startFileprint()
if(cardOK)
{
sdprinting = true;

}
}

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ M Codes
* M29 - Stop SD write
* M30 - Delete file from SD (M30 filename.g)
* M31 - Output time since last M109 or SD card start to serial
* M32 - Select file and start SD print (Can be used when printing from SD card)
* M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
* M80 - Turn on Power Supply
* M81 - Turn off Power Supply
Expand Down

0 comments on commit 461dad6

Please sign in to comment.