Support individual solenoid disable with M381 (#13008)
This commit is contained in:
		
				
					committed by
					
						
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							d81342254a
						
					
				
				
					commit
					19cf72e057
				
			@@ -35,15 +35,22 @@
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M380() {
 | 
			
		||||
  #if ENABLED(MANUAL_SOLENOID_CONTROL)
 | 
			
		||||
    enable_solenoid(parser.seenval('S') ? parser.value_int() : active_extruder);
 | 
			
		||||
    enable_solenoid(parser.intval('S', active_extruder));
 | 
			
		||||
  #else
 | 
			
		||||
    enable_solenoid_on_active_extruder();
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * M381: Disable all solenoids
 | 
			
		||||
 * M381: Disable all solenoids if EXT_SOLENOID
 | 
			
		||||
 *       Disable selected/active solenoid if MANUAL_SOLENOID_CONTROL
 | 
			
		||||
 */
 | 
			
		||||
void GcodeSuite::M381() { disable_all_solenoids(); }
 | 
			
		||||
void GcodeSuite::M381() { 
 | 
			
		||||
  #if ENABLED(MANUAL_SOLENOID_CONTROL)
 | 
			
		||||
    disable_solenoid(parser.intval('S', active_extruder));
 | 
			
		||||
  #else
 | 
			
		||||
    disable_all_solenoids();
 | 
			
		||||
  #endif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif // EXT_SOLENOID || MANUAL_SOLENOID_CONTROL
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user