Home        Store        Docs        Blog

Pymavlink manual control

ardusub

(gtl) #1

Hello guys,
I apllied pymavlink directly in RPI recently and I succeed in

master.mav.manual_control_send(
    master.target_system,
    100,
    0,
    0,
    0,
    buttons)

to control x input.
However, when I do this, the parameters of y, z, r are changed as well.
I check the code instruction:
X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid
I tried INT16_MAX but it is not defined.
I check the value of INT16_MAX in file
modules\PX4Firmware\Build\px4fmu-v2_APM.build\nuttx-export\include\stdint.h:
63: #define INT16_MAX 32767
I applied 32767 in x but the motor worked as max power.
How can I modified only one axe use this manual_control_send command?
Any help will be grateful. Thanks!
sincerely,
gtl


(Jacob) #2

This constraint is not implemented/respected on the autopilot firmware. If you want the output to be zero, send 0. If you want the output to be the same as previous, store the previous output in a variable to send the same value later.


(Jacob) #3

(gtl) #4

Hi Jacb,
Thank you for your answer. I found that the middle value of throttle was not 0 in the earlier time. It helps a lot! Thank you!