Modified to use new FILE_TRANSFER_PROTOCOL message

- Also corrected system/component id transmit/check
This commit is contained in:
Don Gagne
2014-08-27 17:14:49 -07:00
parent 96f5a823e9
commit 0eea110f6f
3 changed files with 30 additions and 25 deletions
+2 -2
View File
@@ -114,7 +114,7 @@ MavlinkFTP::_worker(Request *req)
uint32_t messageCRC;
// basic sanity checks; must validate length before use
if ((hdr->magic != kProtocolMagic) || (hdr->size > kMaxDataLength)) {
if (hdr->size > kMaxDataLength) {
errorCode = kErrNoRequest;
goto out;
}
@@ -199,7 +199,7 @@ MavlinkFTP::_reply(Request *req)
{
auto hdr = req->header();
hdr->magic = kProtocolMagic;
hdr->seqNumber = req->header()->seqNumber + 1;
// message is assumed to be already constructed in the request buffer, so generate the CRC
hdr->crc32 = 0;