Hello All,
I am having some issues with the mavlink protocol setting and recieving missions
First:
when I send Mission clear all and then request mission list, there is always mission seq #0 which appears to be my current lat and long (might also be position where I turned on the copter). Is this Correct? is this mission always going to be there? I just wanted to make sure I am doing it correctly.
Second:
when I set a mission I send
Messages:
#44, Mission_Count .. to initiate a write transaction
#39, Mission_Item ... the mission Item I want to write
Bytes Sent:
254 : start byte
37 : payload
2 : seq
255 : systemID
190 :component ID
39 :Msg ID
//using mav_cmd enum 16 -- "Mav_CMD_Nav_WayPoint"
param1 =0 //hold
param2 =1 //radius
param3 =0 //pass through
param4 =0 //yaw
param5 =1 //lat just as test
param6 =1 //long just as test
param7 =0 //alt
: 0 : seq
16 : command
1 : Target systemID
0 : Target componentID
0 : frame
1:current
0 : auto continue
CRC
In response I get a Message #40 which is mission_request and seq#0
(I think its in response to the mission Count I sent)
then I get mission Mission Ack value=0
which is great because it means it accepted my mission.
But, then I get a Message #253 Severity =1 which is
"Action should be taken immediately. Indicates error in non-critical systems."
and the text is "flight plan received" |
However, when I request the mission list, the mission is not changed...
does anyone know the right order of commands to write missions?
I just sniffed some packets from mission planner to come up with how to do it.
thanks,
Jason
PS. I am writing in C# creating packets byte by byte and sending them. I am not using any of the c++ mavlink code for packing messages.
my CRC's are correct also.