Commit 7588d140 authored by Michael Carpenter's avatar Michael Carpenter

Addition of requesting status updates from APM, if APM is in a state with no...

Addition of requesting status updates from APM, if APM is in a state with no status updates, this will request them
parent 5f05214d
...@@ -383,6 +383,26 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b) ...@@ -383,6 +383,26 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
// Create a new UAS object // Create a new UAS object
uas = QGCMAVLinkUASFactory::createUAS(this, link, message.sysid, &heartbeat); uas = QGCMAVLinkUASFactory::createUAS(this, link, message.sysid, &heartbeat);
//This is the first instance of this UAS being known, request update rates:
mavlink_message_t newmsg;
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,2,2,1); // Extended Status, 2hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,6,3,1); //Position 3hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,10,10,1); //Extra 1 10hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,11,10,1); //Extra 2 10hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,12,2,1); //Extra 3 2hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,1,2,1); //Raw Sensors 2hz
sendMessage(link,newmsg);
mavlink_msg_request_data_stream_pack(1,255,&newmsg,message.sysid,message.compid,3,2,1); //RC Channels 2hz
sendMessage(link,newmsg);
} }
// Only count message if UAS exists for this message // Only count message if UAS exists for this message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment