I want to know how to plan a mission so that channel 5 is turned on when the auto mode is selected and turned off on reaching the last way point.
you can use do-set-servo mission item
I have tried that but it doesn’t turn on the relay when I operate the mode switch on my receiver. I am using one of those relays which is triggered by pwm. It will operate in manual mode ok.
What is servo 5 function set to? Did it do the rest of the mission? ie just being in auto mode is not enough has to be armed also
The channel 5 function is set to 1 and operates ok in manual mode. mission planner indicates it is armed and the steering servo (channel 1) operates in manual and auto modes.
No I have not done a mission yet, I want the relay (channel 5) to operate first.
If it’s a DO_SET_SERVO command it won’t operate until the Mission Starts. Just run this in MP SITL and monitor the Chan 5 output on the Status screen for how it will operate.
Also in pre-AC 4.0 the do_set_servo command wont work on a channel already set to any RC function. Set the servo function for that channel to 0 then it should work in missions.
That’s a very good point. If you use my suggestion and try it in SITL it will work with Passthrough enabled because SITL runs 4.0.1-dev. So, sorry not the most comprehensive advice.
I can’t manually switch on channel 5 with function set to 0, maybe it will work in missions but I can’t test that.
I don’t know anything about SITL I will need to learn about that.
I will have to think about a work around.
I suppose you are using Rover 2.51 because you have an obsolete Flight Controller. The best workaround would be to replace it.
Thanks Dave, yes I am using an APM 2.6.
I do have a pixhawk but it seems a waste to use as I need to do two things,… turn a motor on using a relay and control a rudder.
The workaround I see is to use channel 1 for rudder and channel 3 for relay control, it seems to work ok using throttle stick full up and down. (from what I can see channel 5 doesn’t work)