diff --git a/src/ViewWidgets/LogDownloadController.cc b/src/ViewWidgets/LogDownloadController.cc index dd2adb475e74bc5fcd65daad14df35c4e5172151..21018a221a1aa7c64c7fe51b074d3fa1ee94cffe 100644 --- a/src/ViewWidgets/LogDownloadController.cc +++ b/src/ViewWidgets/LogDownloadController.cc @@ -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) diff --git a/src/ViewWidgets/LogDownloadController.h b/src/ViewWidgets/LogDownloadController.h index 9a0abc853ad1da77cd887adf97dd777138f13399..5956a9923d91b5ff70c90a82f4a435291423629a 100644 --- a/src/ViewWidgets/LogDownloadController.h +++ b/src/ViewWidgets/LogDownloadController.h @@ -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();