RC_CHANNELS_OVERRIDE and flying with joystick

I'm trying to control an APM using Mavlink and a joystick.

I understand that the Mavlink message I need to send for this is RC_CHANNELS_OVERRIDE. Some of the fields in this message are obscure to me.

I notice that Mission Planner sets SystemID=255 and ComponentID=190 in the packet header, and in the body of the message itself sets target_system=220 and target_component=5.

Where do these numbers come from? Are they important? Are they constants? Do they change with APM configuration? Mavlink documentation says precious little about these.

Ari.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Developer

    Can you help me out with how you are actually encoding the packet and sending it over the serial stream? A tiny bit of example code would be very helpful :)

    I'm using Arduino BTW.

  • Have you made any progress with your project? I am trying something similar but I'm having a little trouble. I can arm and throttle my helicopter no problem. The problem is when I try to override more than one channel at a time. The copter seems to run at almost full speed only. have you experienced anything similar?

  • ComponentID=190 seems to match MAV_COMP_ID_MISSIONPLANNER member of the MAV_COMPONENT enumeration in XML.


    Ari.

  • My parsing code was inconsistent with MAVLink encoding. I was reading fields in the order that they appear in the XML, while in reality, MAVLink reorders them based on field width. So I was parsing the high and low bytes of chan1_raw into the target system and target component, and then parsing chan2_raw into chan1_raw and so forth. With this reordering, I get target_system=1 and target_component=1, which makes a lot more sense.

    Ari.

This reply was deleted.

Activity

Liam left a comment on Agricultural UAVs
"Hi
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
Jun 30
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Jun 29
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Jun 29
More…