Merge pull request #1369 from PavelSindler/M220_MK3
M220: possibility to backup/restore speed
This commit is contained in:
commit
1948cb6310
@ -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======================================
|
||||
//===========================================================================
|
||||
@ -6078,12 +6080,20 @@ Sigma_Exit:
|
||||
SERIAL_ECHOLN("");
|
||||
}break;
|
||||
#endif
|
||||
|
||||
case 220: // M220 S<factor in percent>- set speed factor override percentage
|
||||
{
|
||||
if(code_seen('S'))
|
||||
if (code_seen('B')) //backup current speed factor
|
||||
{
|
||||
saved_feedmultiply_mm = feedmultiply;
|
||||
}
|
||||
if(code_seen('S'))
|
||||
{
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user