Connecting a servo to Pixhawk 2.4.8

I want to connect an MG996R servo to the Piwhawk 2.4.8 autopilot, without the remote control interference, resulting in a continuous angular swing of 10 degrees right and 10 degrees left. I have powered the servo mechanism from the BEC of the ESC and the PWM command is given from AUX1. I have been able to move the servo, but not continuously, from mission planner with commands from Servo Output by selecting SERVOn_MAX or SERVOn_MIN or SERVOn_TRIM values. The only solution is using Lua file ?

Lua scripting doesn’t work for Px4 . Only Ardupilot does this !