M112 control on pins

Is there a way to define what effect an M112 halt command has on various pins?

For instance, I would like an M112 to change the state of pins 2.4, 2.6 & 2.7.

At the moment it appears to only be able to do this to pin 2.6.

thanks,
Domenic

Imported from wikidot

yes as answered on irc. the switch module settings on the wiki documents them

Wolfmanjm, thanks for your help on this.

The ‘fail_safe_set_to’ parameter did the trick but only after I updated the firmware to the latest edge version. Before that an M112 event was not triggering this parameter.

What is occurring now is the startup_state is not being correctly set. In this case the fan does not initialise as on when the smoothieboard starts up.
Here is the code I am using:

switch.fan.enable                            true
switch.fan.input_on_command       M106
switch.fan.input_off_command       M107
switch.fan.output_pin                      2.4
switch.fan.output_type                    digital           
switch.fan.startup_state                  true
switch.fan.fail_safe_set_to              0
switch.fan.ignore_on_halt               false

Any Ideas on why this would be the case?

By default pins are pwm, so the .startup_state is not used, you would use the .startup_value instead and set it to 255