mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 05:53:34 +08:00
Modified to use new FILE_TRANSFER_PROTOCOL message
- Also corrected system/component id transmit/check
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user