Commit e4434dc9 authored by Don Gagne's avatar Don Gagne

Rebase to master, fix merge problems

parent bf9553bb
......@@ -379,7 +379,7 @@ void FileManager::receiveMessage(LinkInterface* link, mavlink_message_t message)
// This is not an error, just the end of the download loop
_closeDownloadSession(true /* success */);
return;
} else if (previousOperation == kCOCreate) {
} else if (request->hdr.req_opcode == kCmdCreateFile) {
// End a failed create file operation
_sendTerminateCommand();
_emitErrorMessage(tr("Nak received creating file, error: %1").arg(errorString(request->data[0])));
......@@ -614,14 +614,14 @@ void FileManager::_ackTimeout(void)
case kCOCreate:
_currentOperation = kCOAck;
_writeFileAccumulator.clear();
_emitErrorMessage(tr("Timeout waiting for ack: Sending Create command"));
_emitErrorMessage(tr("Timeout waiting for ack: Sending Terminate command"));
_sendTerminateCommand();
break;
case kCOWrite:
_currentOperation = kCOAck;
_writeFileAccumulator.clear();
_emitErrorMessage(tr("Timeout waiting for ack: Sending Write command"));
_emitErrorMessage(tr("Timeout waiting for ack: Sending Terminate command"));
_sendTerminateCommand();
break;
......
......@@ -61,6 +61,10 @@ public:
/// @param dirPath Fully qualified path to list
void listDirectory(const QString& dirPath);
/// Upload the specified file to the specified location
void uploadPath(const QString& toPath, const QFileInfo& uploadFile);
signals:
/// @brief Signalled whenever an error occurs during the listDirectory or downloadPath methods.
void errorMessage(const QString& msg);
......@@ -97,9 +101,6 @@ signals:
public slots:
void receiveMessage(LinkInterface* link, mavlink_message_t message);
void listDirectory(const QString& dirPath);
void downloadPath(const QString& from, const QDir& downloadDir);
void uploadPath(const QString& toPath, const QFileInfo& uploadFile);
private slots:
void _ackTimeout(void);
......@@ -188,6 +189,7 @@ private:
kCORead, // waiting for Read response
kCOBurst, // waiting for Burst response
kCOWrite, // waiting for Write response
kCOCreate, // waiting for Create response
};
bool _sendOpcodeOnlyCmd(uint8_t opcode, OperationState newOpState);
......
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