Sending command from rpi to px4 to spin motors in test mode to x%

Hello Community,

I have an Rpi connected to px4 over ttyS0 and at present I can arm/disarm the drone with dronekit API.

In a test mode, I want to send a command (in python running on Rpi) to request the motor (without propeller attached) to spin at x% (x can take value between 10 and 100) but I have been struggling to find a way to do it.

Would anyone know how to do that?

Thanks in advance

I like to know how does this statement get passed where these are the returned values

#Get all vehicle attributes (state)
EKF OK?: False
Is Armable?: False

#Check that vehicle is armable
while not vehicle.is_armable:
print(" Waiting for vehicle to initialise…")
time.sleep(1)

AP: ArduCopter V4.1.0 (ea559a56)
AP: ChibiOS: 08877972
AP: CubeBlack 002F0039 30385111 30343937
Name: dronekit Version: 2.9.2
Name: pyserial Version: 3.4
Python 2.7.16