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

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…