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.


Views: 1843

Reply to This

Replies to This Discussion

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.


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


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?

I have not seen the behavior you describe. I am working on a WiFi system now, where I run Linux both on TX and RX. I find that less trouble.


Thanks for your reply, I don't remember how I fixed this but its working now :)

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.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service