Skip to content

Commit

Permalink
special variable for saving/restoring feedmultiply using M220
Browse files Browse the repository at this point in the history
  • Loading branch information
PavelSindler committed Nov 29, 2018
1 parent 9087645 commit 929e1de
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Firmware/Marlin_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ static bool saved_extruder_relative_mode = false;
static int saved_fanSpeed = 0; //!< Print fan speed
//! @}

static int saved_feedmultiply_mm = 100;

//===========================================================================
//=============================Routines======================================
//===========================================================================
Expand Down Expand Up @@ -6082,8 +6084,12 @@ SERIAL_PROTOCOLPGM("\n\n");
{
if(code_seen('S'))
{
saved_feedmultiply_mm = feedmultiply;
feedmultiply = code_value() ;
}
if (code_seen('R')) { //restore previous feedmultiply
feedmultiply = saved_feedmultiply_mm;
}
}
break;
case 221: // M221 S<factor in percent>- set extrude factor override percentage
Expand Down

0 comments on commit 929e1de

Please sign in to comment.