I am planning to add flaps to the plane and wondering if I should just add it as an extra channel on the transmitter or should I incorporate it into the APM 2.1 code.
Would it effect the "stabilized", "fly by wire" etc mode flying, or APM would compensate when using the flaps?
Did anybody add flaps to the APM code?
Replies
I had camera setup on the old code move down when it was 20m above the ground. You could use a similar idea to make the flaps deploy when you are landing and taking off. The code below is a shortened version of what I have as well as being generic. If copter/plane higher than 20m above home servo turns 45° to the left. If not it stays 45° to the right.
Put it in a routine and it will do it automatically.
if (current_loc.alt - home.alt > 20)
{
APM_RC.OutputCh(CH_6,1500 + (-45*10.31));
return;
}
else
{
APM_RC.OutputCh(CH_6,1500 + (45*10.31));
}