Hello,
You can grab a branch here https://github.com/AzurDrones/ardupilot/tree/motor_failure_switch that implement a motor failure on RC switch.
To use it set MOT_FAIL_NUM to the motor number you want to make fail. Set the faillure percentage on MOT_FAIL_PCT. Use switch, let’s say channel 8, by setting RC8_OPTION to 99. Now, putting the switch at HIGH will cut MOT_FAIL_NUM output pwm by MOT_FAIL_PCT.
PLEASE !!! TRAIN ON SITL !!! TRAIN ON SIMULATOR FIRST !!! YOU CANNOT BREAK YOU SIMULATOR !!! (http://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html)
This is a dangerous code, so please use SITL first to test the behavior ! And validate the complet mission you will make on SITL first ! That way, no surprise !
We will be interested in the result and the study you will make on this behavior, would you share it ?