How to control the PWM of the motors via MavLink?

Hi, I have a project. I have a problem, I have a PixHawk flight controller and a raspberry pie 3 b and a mavlink connection, and I want to use a python script to send a signal to the motors 1000 back, 1500 neutral, 2000 forward. The motors are vector TNPA. And I need to create a function for moving forward, backward, left, right. The motors are connected to the main output on PixHawk. How to control the PWM of the motors via MavLink?

Hi,
I don’t think you need to go to such trouble. MAVLINK provides standard SDK and API, so I would recommend that you control the drone through such a mechanism.