Apply TERN to compact code (#17619)
This commit is contained in:
		@@ -31,9 +31,7 @@
 | 
			
		||||
 * M108: Stop the waiting for heaters in M109, M190, M303. Does not affect the target temperature.
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M108() {
 | 
			
		||||
  #if HAS_RESUME_CONTINUE
 | 
			
		||||
    wait_for_user = false;
 | 
			
		||||
  #endif
 | 
			
		||||
  TERN_(HAS_RESUME_CONTINUE, wait_for_user = false);
 | 
			
		||||
  wait_for_heatup = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -37,9 +37,7 @@ void GcodeSuite::M17() {
 | 
			
		||||
    if (parser.seen('X')) ENABLE_AXIS_X();
 | 
			
		||||
    if (parser.seen('Y')) ENABLE_AXIS_Y();
 | 
			
		||||
    if (parser.seen('Z')) ENABLE_AXIS_Z();
 | 
			
		||||
    #if HAS_E_STEPPER_ENABLE
 | 
			
		||||
      if (parser.seen('E')) enable_e_steppers();
 | 
			
		||||
    #endif
 | 
			
		||||
    if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen('E'))) enable_e_steppers();
 | 
			
		||||
  }
 | 
			
		||||
  else {
 | 
			
		||||
    LCD_MESSAGEPGM(MSG_NO_MOVE);
 | 
			
		||||
@@ -60,9 +58,7 @@ void GcodeSuite::M18_M84() {
 | 
			
		||||
      if (parser.seen('X')) DISABLE_AXIS_X();
 | 
			
		||||
      if (parser.seen('Y')) DISABLE_AXIS_Y();
 | 
			
		||||
      if (parser.seen('Z')) DISABLE_AXIS_Z();
 | 
			
		||||
      #if HAS_E_STEPPER_ENABLE
 | 
			
		||||
        if (parser.seen('E')) disable_e_steppers();
 | 
			
		||||
      #endif
 | 
			
		||||
      if (TERN0(HAS_E_STEPPER_ENABLE, parser.seen('E'))) disable_e_steppers();
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
      planner.finish_and_disable();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user