Need help with firmware modification for my own use

I would like to modify the APM arducopter firmware for my own use. This is for a quadcopter, and I’m running the APM 2.6 version.

I need to add a 5th servo output that is the average of the PWM values of servos 1-4. As I look into AP_MotorsSingle.cpp, I see some possibilities, but It also looks like I would have to modify things like get_motor_mask as well. I’m certain their are other things that would need to change that aren’t immediately apparent.

The code is complicated enough that I don’t feel comfortable making this modification without consulting someone who knows a lot more about it than myself.

I should state that I have successfully modified a few lines to smooth out the current measurements, and to add a battery ESR ‘correction factor’ (adds ESR * Amps to the displayed battery voltage), but this new “average output” is beyond my capabilities.

Would someone be willing to help me?

a number of devs hang out in gitter and mumble and sometimes skype.

( both of those links came from here: )

Thank you very much! Hopefully I can find someone who will take pity on
me and help!

Charles Linquist