Commit 18ab0fef authored by dogmaphobic's avatar dogmaphobic

Log Download Fixes

parent 0e6ddf08
......@@ -26,7 +26,7 @@
#define kTimeOutMilliseconds 500
#define kGUIRateMilliseconds 17
#define kTableBins 128
#define kTableBins 512
#define kChunkSize (kTableBins * MAVLINK_MSG_LOG_DATA_FIELD_DATA_LEN)
QGC_LOGGING_CATEGORY(LogDownloadLog, "LogDownloadLog")
......@@ -234,8 +234,7 @@ void
LogDownloadController::_receivedAllEntries()
{
_timer.stop();
_requestingLogEntries = false;
emit requestingListChanged();
_setListing(false);
}
//----------------------------------------------------------------------------------------
......@@ -458,7 +457,8 @@ void
LogDownloadController::refresh(void)
{
_logEntriesModel.clear();
_requestLogList();
//-- Get first 50 entries
_requestLogList(0, 49);
}
//----------------------------------------------------------------------------------------
......@@ -467,8 +467,7 @@ LogDownloadController::_requestLogList(uint32_t start, uint32_t end)
{
if(_vehicle && _uas) {
qCDebug(LogDownloadLog) << "Request log entry list (" << start << "through" << end << ")";
_requestingLogEntries = true;
emit requestingListChanged();
_setListing(true);
mavlink_message_t msg;
mavlink_msg_log_request_list_pack(
qgcApp()->toolbox()->mavlinkProtocol()->getSystemId(),
......@@ -479,8 +478,8 @@ LogDownloadController::_requestLogList(uint32_t start, uint32_t end)
start,
end);
_vehicle->sendMessageOnLink(_vehicle->priorityLink(), msg);
//-- Wait 2 seconds before bitching about not getting anything
_timer.start(2000);
//-- Wait 5 seconds before bitching about not getting anything
_timer.start(5000);
}
}
......@@ -610,6 +609,15 @@ LogDownloadController::_setDownloading(bool active)
emit downloadingLogsChanged();
}
//----------------------------------------------------------------------------------------
void
LogDownloadController::_setListing(bool active)
{
_requestingLogEntries = active;
_vehicle->setConnectionLostEnabled(!active);
emit requestingListChanged();
}
//----------------------------------------------------------------------------------------
void
LogDownloadController::eraseAll(void)
......
......@@ -152,10 +152,11 @@ private:
void _receivedAllData ();
void _resetSelection (bool canceled = false);
void _findMissingData ();
void _requestLogList (uint32_t start = 0, uint32_t end = 0xFFFF);
void _requestLogList (uint32_t start, uint32_t end);
void _requestLogData (uint8_t id, uint32_t offset = 0, uint32_t count = 0xFFFFFFFF);
bool _prepareLogDownload();
void _setDownloading (bool active);
void _setListing (bool active);
QGCLogEntry* _getNextSelected();
......
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