I can't am my IRIS using MAVLink

I am making my own GCS and for radio communication i have copied the MAVLink classes from the MissionPlanner instead of making everything from the ground up. I’ve tried sending an Arm message since i figured it would be the easiest way to verify that the message was received.

When arming from the MissionPlanner the rotors start spinning, however when i try doing it with a testprogram (just a barebones GUI with a button which calls the doARM() method) it won’t arm.

I tried using a 2nd pc to read the radio telemetry and have a 0 instead of a 1 on byte 36 compared with the MissionPlanner. I’ve tried calling doARM() with true as well as false as the parameter and got the same result.

Message from MissionPlanner:
(byte number) (value)
0 254
1 33
2 103
3 255
4 190
5 76
6 0
7 0
8 128
9 63
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 144
35 1
36 1
37 250
38 0
39 62
40 251

Message from own project:
(byte number) (value)
0 254
1 33
2 0
3 255
4 190
5 76
6 0
7 0
8 0
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 0
31 0
32 0
33 0
34 144
35 1
36 0
37 250
38 0
39 118
40 215

Any ideas on what i’m doing wrong?

Hey Yantia,

I have also been writing code for LabVIEW to use the ARM command and have had little success till I read your post.

I was sucessfully able to ARM my UAV by taking the data array your mission planner output and sending it through to mine (of course I had to modify the CRC and the sequence number but everything else was identical).

What I don’t understand is why that data works? I thought you had to set PARAM one to the number 1?

This would result in the following byte array for Param 1(in little Endian):

Byte Data

6: 128
7: 0
8: 0
9: 0

Can anyone explain why it’s:
Byte Data

6: 0
7: 0
8: 128
9: 63

???

I just figured out my problem.

I re-read the protocol and realised they are not U32’s but they are floats. 1 as a float number converted to a little endian byte array gives you:

Byte Data

6. 0
7. 0
8. 128
9. 63

For Param 1