# RC Override Control (65535) Not Working

**URL:** <https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775>\
**Category:** ArduSub\
**Tags:** pymavlink\
**Created:** [March 18, 2022, 8:47pm UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775 "2022-03-18T20:47:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marios](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Marios](https://discuss.bluerobotics.com/u/Marios)\
**Post date:** [March 18, 2022, 8:47pm UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/1 "2022-03-18T20:47:13Z")

</div>

Hi,

I use the code given [Pymavlink · GitBook](https://www.ardusub.com/developers/pymavlink.html#send-rc-joystick) to send manual moves to the vehicle but the override value (65535) does NOT work. (function set\_rc\_channel\_pwm() )

I already read these posts:

> [@RC Override Control Not Working](https://discuss.bluerobotics.com/t/rc-override-control-not-working/10337):
>
> Hello, I an trying to control the BlueRov2 with following code: # Import mavutil from pymavlink import mavutil # Create the connection master = mavutil.mavlink\_connection('udpin:0.0.0.0:14550') # Wait a heartbeat before sending commands master.wait\_heartbeat() # Create a function to send RC values # More information about Joystick channels # here: https://www.ardusub.com/operators-manual/rc-input-and-output.html#rc-inputs def set\_rc\_channel\_pwm(channel\_id, pwm=1500): """ Set RC channel p…

> [@RC Override Control Not Working after change Ardusub Version](https://discuss.bluerobotics.com/t/rc-override-control-not-working-after-change-ardusub-version/10245):
>
> Hello, I cannot control any thruster through the code from the [example](http://www.ardusub.com/developers/pymavlink.html) from the BlueROV webside. Here is my code, I have stop the heartbeat check from QgroundControl, and marked some of my adjustment. The code is now the same as the example # Import mavutil from pymavlink import mavutil # Create the connection master = mavutil.mavlink\_connection('udpin:0.0.0.0:14550') # master = mavutil.mavlink\_connection('/dev/ttyS1', baud=115200) # Wait a heartbeat before sending commands master.wait\_heart…

I did the below:

- Both ArduSub and Companion are at the latest version
- If I replace the 65535 to 1500 then the vehicle performs the movement correctly! (e.g. Forward, Lateral)
- If i use Beta or Developement versions the override value (65535) works, BUT the pressure sensor is not recognized ( I use the [Bar30 High-Resolution 300m Depth /Pressure Sensor](https://bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-r1/)) so I cannot use “depth hold” mode, only stabilize.
- When I install the stable version (4.0.3) the pressure sensor works again but the override does not work.
- The SERIAL0\_PROTOCOL parameter is to mavlink2 by default.

Any ideas?

Thank you,  
Marios

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 21, 2022, 5:12am UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/2 "2022-03-21T05:12:37Z")

</div>

Hi @Marios, welcome to the forum 🙂

> [@Marios](#):
>
> the override value (65535) does NOT work.

What do you mean by this? 65535 is the “ignore” value, which means [that channel doesn’t get updated](https://github.com/ArduPilot/ardupilot/blob/Sub-4.0/libraries/GCS_MAVLink/GCS_Common.cpp#L2935). Channels set to 65535 in an rc\_channels\_override message will maintain whatever value was already stored, which can potentially cause issues with other controls.

This quote (and the post it’s from) are relevant:

> [@When Python runs the "send RC" script, the result is incorrect](https://discuss.bluerobotics.com/t/when-python-runs-the-send-rc-script-the-result-is-incorrect/10803/4):
>
> the motion should be explicitly set to stopped before arming, otherwise arming can sometimes resume the last thruster state from the last time the vehicle was armed.
> 
> If you’re interested I’ve made an example program [here](https://gist.github.com/ES-Alexander/ee1dd479dd728b7cef1bf936f9114e71), which sends regular heartbeats and handles arming/disarming and setting the flight mode.

I would also recommend you look into the [failsafes and timeouts](https://discuss.bluerobotics.com/t/t200-python-manual-control-error/11479/2) 🙂

> [@Marios](#):
>
> If i use Beta or Developement versions the override value (65535) works, BUT the pressure sensor is not recognized ( I use the [Bar30 High-Resolution 300m Depth /Pressure Sensor](https://bluerobotics.com/store/sensors-sonars-cameras/sensors/bar30-sensor-r1/)) so I cannot use “depth hold” mode, only stabilize.

In case you want to try running beta/devel anyway,

> [@WaterLinked DVL A50 integration not working](https://discuss.bluerobotics.com/t/waterlinked-dvl-a50-integration-not-working/11501/5):
>
> ArduSub beta recently had a couple of updates that apparently messed up a default parameter for the depth sensor. The issue should be fixed if you
> 
> > [@Ongoing DVL-A50 issues](https://discuss.bluerobotics.com/t/ongoing-dvl-a50-issues/11419/10):
> >
> > try setting `BARO_PROBE_EXT` to 768 and then reboot.

---

<div class="post-metadata">

**Author:** ![Marios](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Marios](https://discuss.bluerobotics.com/u/Marios)\
**Post date:** [March 28, 2022, 12:34pm UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/3 "2022-03-28T12:34:36Z")

</div>

Hi,

Thanks for your response and sorry for the delayed answer.

I forgot to mention that when i run the bellow code with 65535 value at line73 all the motors work at **full speed**. If I use it with 1500 the motions are performed correctly.  
All the tests are performed at manual flight mode.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/c/cdb55bef378d908d790092024d125ad125e59507.png)

Also, I use the wait commands for arm, disarom, hearbeat (eg. master.motors\_armed\_wait()).  
At one of the posts I saw that when its armed it uses the motions of last commands. Yes that is happening for the first 1 second but after that, it gets the new commands. (when I don’t use 65535)

Example of code i use:

```auto
def test4():
    manual()
    arm()
    surge(0.3)
    sleep(2)
    surge(0)
    sleep(1)
    disarm()

```

```auto
def manual():
    MANUAL = 'MANUAL'
    MANUAL_MODE = init.master.mode_mapping()[MANUAL]
    while not init.master.wait_heartbeat().custom_mode == MANUAL_MODE:
        init.master.set_mode(MANUAL)

```

```auto
def arm():
    # arm ArduSub autopilot and wait until confirmed
    init.master.arducopter_arm()
    print("Waiting arm confirmation...")
    init.master.motors_armed_wait()
    print("-- ARMED --")
    sleep(0.01)

```

```auto
def surge(speed):
    set_rc_channel_pwm(5, int(1500 + speed*400))
    print("Surge: " + str(int(speed*100)) + "%")

```

```auto
def set_rc_channel_pwm(channel_id, pwm=1500):
    if channel_id < 1 or channel_id > 18:
        print("Channel does not exist.")
        return

    rc_channel_values = [1500 for _ in range(18)] # 0xffff # 65535
    rc_channel_values[channel_id - 1] = pwm
    init.master.mav.rc_channels_override_send(
        init.master.target_system, # target_system
        init.master.target_component, # target_component
        *rc_channel_values) # RC channel list, in microseconds.

```

With this test code, the four horizontal oriented thrusters should work at low speed but all thrusters work at maximum speed.

I didn’t check the beta version solution for the pressure sensor yet. I prefer to try and solve this in stable and in worst case senario I will use the beta one. For now I use this code with 1500 instead of the ignore value 65535.

Thanks  
Marios

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [March 29, 2022, 3:02am UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/4 "2022-03-29T03:02:55Z")

</div>

Hi @Marios,

Your code doesn’t seem to include the explicit stop I mentioned (send 1500 to the 6 movement channels, and 65535 to the rest of the channels) before arming - I would suggest trying that to see if it helps.

You’re also welcome to try the full program example I linked you to, which was definitely working for me when I created it.

> [@Marios](#):
>
> For now I use this code with 1500 instead of the ignore value 65535.

That’s not particularly recommended, because (if you have them) it forces connected lights and the camera tilt servo to be set to the middle, and also makes it impossible to command two motion axes concurrently (e.g. if you want to go forwards and sideways, sending a forwards signal tells sideways motion to stop, and sending a sideways signal tells forward motion to stop). The whole idea with the ‘ignore’ value is that it maintains the other commands while you change one of them.

If you don’t have lights or a camera tilt servo, and it’s not important for your vehicle to be able to move in more than one direction at a time, then your proposed workaround should work (i.e. it shouldn’t have any other problematic side-effects), it’s just an odd way of going about things.

---

<div class="post-metadata">

**Author:** ![Marios](https://avatars.discourse-cdn.com/v4/letter/m/f04885/32.png) [@Marios](https://discuss.bluerobotics.com/u/Marios)\
**Post date:** [April 1, 2022, 3:00pm UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/5 "2022-04-01T15:00:30Z")

</div>

Hi @EliotBR,

I missed the code you sent me so I tried it out and it worked!

So the problem was that I was defining the `rc_channel_values` as List and not as tuple.  
In your example code at `send_rc()` function you send a tuple with `master.mav.rc_channels_override_send` . So I changed my code and it works fine (with 65535)

Thanks for all your help!

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [April 2, 2022, 4:16am UTC](https://discuss.bluerobotics.com/t/rc-override-control-65535-not-working/11775/6 "2022-04-02T04:16:08Z")

</div>

> [@Marios](#):
>
> I missed the code you sent me so I tried it out and it worked!

Glad to hear it 🙂

> [@Marios](#):
>
> So the problem was that I was defining the `rc_channel_values` as List and not as tuple.  
> In your example code at `send_rc()` function you send a tuple with `master.mav.rc_channels_override_send` .

That’s not actually relevant, and can’t be the cause of the issues you were having. The values get unpacked directly into the `rc_channels_override_send` function call, so whether it’s a list or tuple before the unpacking doesn’t matter (`*rc_channel_values` means the function gets the values passed in as positional arguments).

> [@Marios](#):
>
> So I changed my code and it works fine (with 65535)

Glad you managed to get something working, even if the cause of the original problem still isn’t clear 🙂
