# Pymavlink manual control

**URL:** <https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905>\
**Category:** Blue Robotics Software\
**Tags:** ardusub\
**Created:** [July 4, 2018, 7:36am UTC](https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905 "2018-07-04T07:36:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggttkl](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@ggttkl](https://discuss.bluerobotics.com/u/ggttkl)\
**Post date:** [July 4, 2018, 7:36am UTC](https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905/1 "2018-07-04T07:36:09Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [July 4, 2018, 6:31pm UTC](https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905/2 "2018-07-04T18:31:59Z")

</div>

> [@ggttkl](#):
>
> A value of INT16\_MAX indicates that this axis is invalid

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.

---

<div class="post-metadata">

**Author:** ![jwalser](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/jwalser/32/2234_2.png) [@jwalser](https://discuss.bluerobotics.com/u/jwalser)\
**Post date:** [July 4, 2018, 6:38pm UTC](https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905/3 "2018-07-04T18:38:27Z")

</div>

[https://github.com/ArduPilot/ardupilot/issues/8818](https://github.com/ArduPilot/ardupilot/issues/8818)

---

<div class="post-metadata">

**Author:** ![ggttkl](https://avatars.discourse-cdn.com/v4/letter/g/ce73a5/32.png) [@ggttkl](https://discuss.bluerobotics.com/u/ggttkl)\
**Post date:** [July 5, 2018, 12:44am UTC](https://discuss.bluerobotics.com/t/pymavlink-manual-control/2905/4 "2018-07-05T00:44:08Z")

</div>

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!
