[output_pin] maximum_mcu_duration param

Hello,

I’m trying to take profit of the maximum_mcu_duration parameter of the [output_pin] config section to configure a failsafe for my printer. configuration reference link
The main power supply of the printer is controlled by two relays which are controlled by another mcu than the main mcu of the machine.
Below the extract of the config file.

[output_pin relay1]
#Arduino Uno pin 7
pin: arduino:PD7
value: 1
shutdown_value: 0
maximum_mcu_duration: 5

[output_pin relay2]
#Arduino Uno pin 6
pin: arduino:PD6
value: 1
shutdown_value: 0
maximum_mcu_duration: 5

My understanding of the documentation is that if I remove the USB cable between the host and the mcu, 5 seconds later the mcu should put itself in shutdown mode. But when I try it in real life nothing append. The mcu stay online for ever.

Do I misunderstand the documentation ? Does my config OK ?

Thank you for your help,

Alas, using maximum_mcu_duration when a start value is different from shutdown_value is not intended and not supported. This configuration should probably raise a config error.

The intent of maximum_mcu_duration is to ensure a non-shutdown value set using the SET_PIN command is verified periodically.

-Kevin

Thank you for your answer. :+1:

Setting value to 0 solve the issue. I will manage powering the printer in the START GCODE

Thanks. I updated the code to raise an error if start value does not equal shutdown value when a maximum duration is specified (commit d1e13b7e).

-Kevin