Skip to content

Commit

Permalink
Comms: Update LogReplayLink Threading
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Jan 7, 2025
1 parent 29ca1b0 commit 112ffe3
Show file tree
Hide file tree
Showing 10 changed files with 661 additions and 597 deletions.
5 changes: 3 additions & 2 deletions src/Comms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_subdirectory(AirLink)
add_subdirectory(MockLink)

find_package(Qt6 REQUIRED COMPONENTS Core Network Qml Test Widgets)
find_package(Qt6 REQUIRED COMPONENTS Core Network Qml)

qt_add_library(Comms STATIC
LinkConfiguration.cc
Expand All @@ -12,6 +12,8 @@ qt_add_library(Comms STATIC
LinkManager.h
LogReplayLink.cc
LogReplayLink.h
LogReplayLinkController.cc
LogReplayLinkController.h
MAVLinkProtocol.cc
MAVLinkProtocol.h
TCPLink.cc
Expand All @@ -23,7 +25,6 @@ qt_add_library(Comms STATIC
target_link_libraries(Comms
PRIVATE
Qt6::Qml
Qt6::Test
MockLink
PositionManager
QGC
Expand Down
4 changes: 2 additions & 2 deletions src/Comms/LinkConfiguration.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ LinkConfiguration *LinkConfiguration::createSettings(int type, const QString &na
break;
#endif
case TypeLogReplay:
config = new LogReplayLinkConfiguration(name);
config = new LogReplayConfiguration(name);
break;
#ifdef QT_DEBUG
case TypeMock:
Expand Down Expand Up @@ -124,7 +124,7 @@ LinkConfiguration *LinkConfiguration::duplicateSettings(const LinkConfiguration
break;
#endif
case TypeLogReplay:
dupe = new LogReplayLinkConfiguration(qobject_cast<const LogReplayLinkConfiguration*>(source));
dupe = new LogReplayConfiguration(qobject_cast<const LogReplayConfiguration*>(source));
break;
#ifdef QT_DEBUG
case TypeMock:
Expand Down
2 changes: 1 addition & 1 deletion src/Comms/LinkInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LinkInterface : public QThread
Q_INVOKABLE virtual void disconnect() = 0; // FIXME: This gets called 3x when closing link

virtual bool isConnected() const = 0;
virtual bool isLogReplay() { return false; }
virtual bool isLogReplay() const { return false; }
virtual bool isSecureConnection() { return false; } ///< Returns true if the connection is secure (e.g. USB, wired ethernet)

SharedLinkConfigurationPtr linkConfiguration() { return _config; }
Expand Down
6 changes: 3 additions & 3 deletions src/Comms/LinkManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#include "LinkManager.h"
#include "DeviceInfo.h"
#include "LogReplayLink.h"
#include "LogReplayLinkController.h"
#include "MAVLinkProtocol.h"
#include "MultiVehicleManager.h"
#include "QGCApplication.h"
Expand Down Expand Up @@ -346,7 +346,7 @@ void LinkManager::loadLinkConfigurationList()
break;
#endif
case LinkConfiguration::TypeLogReplay:
link = new LogReplayLinkConfiguration(name);
link = new LogReplayConfiguration(name);
break;
#ifdef QT_DEBUG
case LinkConfiguration::TypeMock:
Expand Down Expand Up @@ -705,7 +705,7 @@ void LinkManager::freeMavlinkChannel(uint8_t channel)

LogReplayLink *LinkManager::startLogReplay(const QString &logFile)
{
LogReplayLinkConfiguration* const linkConfig = new LogReplayLinkConfiguration(tr("Log Replay"));
LogReplayConfiguration* const linkConfig = new LogReplayConfiguration(tr("Log Replay"));
linkConfig->setLogFilename(logFile);
linkConfig->setName(linkConfig->logFilenameShort());

Expand Down
Loading

0 comments on commit 112ffe3

Please sign in to comment.