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
|
||||
|
@ -547,7 +547,7 @@ void GcodeSuite::process_parsed_command(
|
||||
|
||||
#if ENABLED(EXT_SOLENOID) || ENABLED(MANUAL_SOLENOID_CONTROL)
|
||||
case 380: M380(); break; // M380: Activate solenoid on active (or specified) extruder
|
||||
case 381: M381(); break; // M381: Disable all solenoids
|
||||
case 381: M381(); break; // M381: Disable all solenoids or, if MANUAL_SOLENOID_CONTROL, active (or specified) solenoid
|
||||
#endif
|
||||
|
||||
case 400: M400(); break; // M400: Finish all moves
|
||||
|
Reference in New Issue
Block a user