|
@@ -7300,17 +7300,26 @@ Sigma_Exit:
|
|
|
*/
|
|
|
case 220: // M220 S<factor in percent>- set speed factor override percentage
|
|
|
{
|
|
|
- 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;
|
|
|
- }
|
|
|
+ bool codesWereSeen = false;
|
|
|
+ if (code_seen('B')) //backup current speed factor
|
|
|
+ {
|
|
|
+ saved_feedmultiply_mm = feedmultiply;
|
|
|
+ codesWereSeen = true;
|
|
|
+ }
|
|
|
+ if (code_seen('S'))
|
|
|
+ {
|
|
|
+ feedmultiply = code_value();
|
|
|
+ codesWereSeen = true;
|
|
|
+ }
|
|
|
+ if (code_seen('R')) //restore previous feedmultiply
|
|
|
+ {
|
|
|
+ feedmultiply = saved_feedmultiply_mm;
|
|
|
+ codesWereSeen = true;
|
|
|
+ }
|
|
|
+ if (!codesWereSeen)
|
|
|
+ {
|
|
|
+ printf_P(PSTR("%i%%\n"), feedmultiply);
|
|
|
+ }
|
|
|
}
|
|
|
break;
|
|
|
|
|
@@ -7326,23 +7335,26 @@ Sigma_Exit:
|
|
|
*/
|
|
|
case 221: // M221 S<factor in percent>- set extrude factor override percentage
|
|
|
{
|
|
|
- if(code_seen('S'))
|
|
|
- {
|
|
|
- int tmp_code = code_value();
|
|
|
- if (code_seen('T'))
|
|
|
+ if (code_seen('S'))
|
|
|
{
|
|
|
- uint8_t extruder;
|
|
|
- if(setTargetedHotend(221, extruder)){
|
|
|
- break;
|
|
|
- }
|
|
|
- extruder_multiply[extruder] = tmp_code;
|
|
|
+ int tmp_code = code_value();
|
|
|
+ if (code_seen('T'))
|
|
|
+ {
|
|
|
+ uint8_t extruder;
|
|
|
+ if (setTargetedHotend(221, extruder))
|
|
|
+ break;
|
|
|
+ extruder_multiply[extruder] = tmp_code;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ extrudemultiply = tmp_code ;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- extrudemultiply = tmp_code ;
|
|
|
+ printf_P(PSTR("%i%%\n"), extrudemultiply);
|
|
|
}
|
|
|
- }
|
|
|
- calculate_extruder_multipliers();
|
|
|
+ calculate_extruder_multipliers();
|
|
|
}
|
|
|
break;
|
|
|
|