diff options
author | Don Gagne <don@thegagnes.com> | 2014-08-27 21:39:55 -0700 |
---|---|---|
committer | Don Gagne <don@thegagnes.com> | 2014-08-27 21:39:55 -0700 |
commit | fce0a3b728f0aca12f9afb678f36cacde865e976 (patch) | |
tree | 96fca14783ce702765fb542c002690c1a7523947 /src/modules/mavlink/mavlink_ftp.cpp | |
parent | 0eea110f6fb4e95238a496f3a71b1cb6741625f7 (diff) | |
download | px4-firmware-fce0a3b728f0aca12f9afb678f36cacde865e976.tar.gz px4-firmware-fce0a3b728f0aca12f9afb678f36cacde865e976.tar.bz2 px4-firmware-fce0a3b728f0aca12f9afb678f36cacde865e976.zip |
Gave up on using bitfields
Diffstat (limited to 'src/modules/mavlink/mavlink_ftp.cpp')
-rw-r--r-- | src/modules/mavlink/mavlink_ftp.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/mavlink/mavlink_ftp.cpp b/src/modules/mavlink/mavlink_ftp.cpp index f4a7bc101..5b65dc369 100644 --- a/src/modules/mavlink/mavlink_ftp.cpp +++ b/src/modules/mavlink/mavlink_ftp.cpp @@ -122,6 +122,9 @@ MavlinkFTP::_worker(Request *req) // check request CRC to make sure this is one of ours messageCRC = hdr->crc32; hdr->crc32 = 0; + hdr->padding[0] = 0; + hdr->padding[1] = 0; + hdr->padding[2] = 0; if (crc32(req->rawData(), req->dataSize()) != messageCRC) { errorCode = kErrNoRequest; goto out; @@ -203,6 +206,9 @@ MavlinkFTP::_reply(Request *req) // message is assumed to be already constructed in the request buffer, so generate the CRC hdr->crc32 = 0; + hdr->padding[0] = 0; + hdr->padding[1] = 0; + hdr->padding[2] = 0; hdr->crc32 = crc32(req->rawData(), req->dataSize()); // then pack and send the reply back to the request source |