How to avoid RC controller requirement to program ardupilot


I am programming ardupilot manually(using mostly hal and a couple of other libraries)

I am trying to get my copter flying but it seems motors will not spin until I connect a rc-transmitter

Could you help me bypass this requirement?

I am developing an app to control my drone with an Android app.

THank you!

Use Guided mode or Auto.
Otherwise, you can use a GCS with a joystick and RC override.

How do I switch to that mode?
I am not using mission-planner
I am just coding the ardupilot like an arduino mega(only with ardupilot libs included)

I try to do this by the same way, but I’m using PixHawk. Do you know how modify the code?