Fmu.cpp help

What exactly is the variable _max_actuators?

Where in fmu.cpp is output being sent to MAIN OUT pins of the pixhawk?

Say I have a quadcopter(pins 1-4 for motors) and I want to use pins 5-8 of MAIN OUT for something. How would I send values to it via code?

I wouldn’t worry about the specifics of fmu.cpp. Take a look at general mixing documentation.

Then you can add passthrough channels or whatever you want to use pins 5-8.