Motors automatically activate when my px4_simple_app module ends


I have programmed a custom quadcopter autopilot using the px4_simple_app module.

The problem I have is when my program exits, it stops controlling the motors (as expected), but then the motors automatically go to some random throttle value, like 50%.

I need to remove this problem, because I will be flight testing and I do not want the motors to automatically engage and cause the vehicle to fly out of control when the program ends.

The reason I deactivated “mc_att_control” was because the program would attempt to send PWM signals to the motors while my program was running, and was causing twitching.

I do not affect the basic start up programs, I only deactivate “mc_att_control” and activate my program using the “extras.txt” file. Do I need to deactivate another program that might automatically send PWM signals?

Or is there another way to solve the problem?

Should I make the program in to a daemon so that it runs automatically in the background?

Or should I create my custom start up using RC.txt? and only activate the essentials for attitude data.

Thank you.

There is a command line application called pwm which allows you to set the failsafe output values. Set them to 900 to disable all motors when no valid control signal is present.

Thank you for the reply.

is this the proper way to use the command “pwm failsafe -a -p 900” ?