Flaps in APM code

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?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

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));

    }

  • Developer
    I have added flaps into APM.  You have (at least) 3 ways you can go, depending on your goals.  You can just stick flaps on a rc channel separate from APM, you can use the servo commands built in to APM to control flaps (only in AUTO mode), or you can write your own code and add it to APM.
This reply was deleted.

Activity