mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 13:43:33 +08:00
mavlink_ftp: add & handle kErrFailFileExists error
This error definitions already existed in QGC
This commit is contained in:
@@ -261,6 +261,11 @@ out:
|
|||||||
payload->req_opcode = payload->opcode;
|
payload->req_opcode = payload->opcode;
|
||||||
payload->opcode = kRspNak;
|
payload->opcode = kRspNak;
|
||||||
payload->size = 1;
|
payload->size = 1;
|
||||||
|
|
||||||
|
if (r_errno == EEXIST) {
|
||||||
|
errorCode = kErrFailFileExists;
|
||||||
|
}
|
||||||
|
|
||||||
payload->data[0] = errorCode;
|
payload->data[0] = errorCode;
|
||||||
|
|
||||||
if (errorCode == kErrFailErrno) {
|
if (errorCode == kErrFailErrno) {
|
||||||
|
|||||||
@@ -117,7 +117,9 @@ public:
|
|||||||
kErrInvalidSession, ///< Session is not currently open
|
kErrInvalidSession, ///< Session is not currently open
|
||||||
kErrNoSessionsAvailable, ///< All available Sessions in use
|
kErrNoSessionsAvailable, ///< All available Sessions in use
|
||||||
kErrEOF, ///< Offset past end of file for List and Read commands
|
kErrEOF, ///< Offset past end of file for List and Read commands
|
||||||
kErrUnknownCommand ///< Unknown command opcode
|
kErrUnknownCommand, ///< Unknown command opcode
|
||||||
|
kErrFailFileExists, ///< File exists already
|
||||||
|
kErrFailFileProtected ///< File is write protected
|
||||||
};
|
};
|
||||||
|
|
||||||
unsigned get_size();
|
unsigned get_size();
|
||||||
|
|||||||
Reference in New Issue
Block a user