Commit bcea3449 authored by Daniel Agar's avatar Daniel Agar

cmake updates for current master

parent 2c09c1d8
......@@ -122,6 +122,7 @@ find_package(Qt5 ${QT_VERSION}
Network
Positioning
Quick
QuickControls2
QuickWidgets
OpenGL
Sql
......
......@@ -11,6 +11,7 @@ set(EXTRA_SRC)
if(MOBILE)
list(APPEND EXTRA_SRC
MobileScreenMgr.cc
MobileScreenMgr.h
)
endif()
if(GST_FOUND)
......@@ -85,25 +86,48 @@ add_library(qgc
${EXTRA_SRC}
CmdLineOptParser.cc
CmdLineOptParser.h
JsonHelper.cc
KMLFileHelper.cc
JsonHelper.h
KMLDomDocument.cc
KMLDomDocument.h
KMLHelper.cc
KMLHelper.h
LogCompressor.cc
LogCompressor.h
main.cc
QGCApplication.cc
QGC.cc
QGC.h
QGCApplication.cc
QGCApplication.h
QGCComboBox.cc
QGCComboBox.h
QGCConfig.h
QGCDockWidget.cc
QGCDockWidget.h
QGCFileDownload.cc
QGCFileDownload.h
QGCLoggingCategory.cc
QGCLoggingCategory.h
QGCMapPalette.cc
QGCMapPalette.h
QGCPalette.cc
QGCPalette.h
QGCQGeoCoordinate.cc
QGCQGeoCoordinate.h
QGCTemporaryFile.cc
QGCTemporaryFile.h
QGCToolbox.cc
QGCToolbox.h
RunGuard.cc
RunGuard.h
ShapeFileHelper.cc
ShapeFileHelper.h
SHPFileHelper.cc
SHPFileHelper.h
stable_headers.h
TerrainTile.cc
TerrainTile.h
)
set_source_files_properties(QGCApplication.cc PROPERTIES COMPILE_DEFINITIONS GIT_VERSION="${GIT_VERSION}")
......@@ -143,6 +167,7 @@ add_subdirectory(ViewWidgets)
target_link_libraries(qgc
PRIVATE
shp
Qt5::QuickControls2
PUBLIC
Qt5::QuickWidgets
......
......@@ -3,7 +3,7 @@ add_subdirectory(MapItems)
add_subdirectory(Widgets)
add_library(FlightMap
Widgets/ValuesWidgetController.cc
#Widgets/ValuesWidgetController.cc
)
target_link_libraries(FlightMap
......
......@@ -68,8 +68,10 @@ add_library(MissionManager
GeoFenceController.h
GeoFenceManager.cc
GeoFenceManager.h
KML.cc
KML.h
KMLPlanDomDocument.cc
KMLPlanDomDocument.h
LandingComplexItem.cc
LandingComplexItem.h
MissionCommandList.cc
MissionCommandList.h
MissionCommandTree.cc
......@@ -103,12 +105,11 @@ add_library(MissionManager
QGCMapPolyline.cc
QGCMapPolyline.h
RallyPoint.cc
RallyPoint.h
RallyPointController.cc
RallyPointController.h
RallyPoint.h
RallyPointManager.cc
RallyPointManager.h
Section.h
SimpleMissionItem.cc
SimpleMissionItem.h
SpeedSection.cc
......@@ -127,6 +128,8 @@ add_library(MissionManager
TransectStyleComplexItem.h
VisualMissionItem.cc
VisualMissionItem.h
VTOLLandingComplexItem.cc
VTOLLandingComplexItem.h
Section.h # shouldn't be listed here, but isn't named properly for AUTOMOC
......@@ -134,7 +137,7 @@ add_library(MissionManager
)
add_custom_Target(MisionManagerQml
SOURCES
SOURCES
QGCMapCircleVisuals.qml
QGCMapPolygonVisuals.qml
QGCMapPolylineVisuals.qml
......@@ -149,3 +152,4 @@ target_link_libraries(MissionManager
)
target_include_directories(MissionManager INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
add_library(QmlControls
AppMessages.cc
CoordinateVector.cc
AppMessages.h
EditPositionDialogController.cc
EditPositionDialogController.h
FlightPathSegment.cc
FlightPathSegment.h
InstrumentValueArea.cc
InstrumentValueArea.h
InstrumentValueData.cc
InstrumentValueData.h
ParameterEditorController.cc
ParameterEditorController.h
QGCFileDialogController.cc
QGCFileDialogController.h
QGCGeoBoundingCube.cc
QGCGeoBoundingCube.h
QGCImageProvider.cc
QGCImageProvider.h
QGroundControlQmlGlobal.cc
QGroundControlQmlGlobal.h
QmlObjectListModel.cc
QmlObjectListModel.h
QmlUnitsConversion.h
RCChannelMonitorController.cc
RCChannelMonitorController.h
RCToParamDialogController.cc
RCToParamDialogController.h
ScreenToolsController.cc
ScreenToolsController.h
TerrainProfile.cc
TerrainProfile.h
)
add_custom_target(QmlControlsQml
......
......@@ -16,21 +16,14 @@ add_library(comm
LogReplayLink.cc
MavlinkMessagesTimer.cc
MAVLinkProtocol.cc
QGCJSBSimLink.cc
QGCMAVLink.cc
QGCSerialPortInfo.cc
QGCXPlaneLink.cc
SerialLink.cc
TCPLink.cc
UDPLink.cc
UdpIODevice.cc
${EXTRA_SRC}
# HEADERS
# shouldn't be listed here, but aren't named properly for AUTOMOC
QGCHilLink.h
QGCJSBSimLink.h
)
target_link_libraries(comm
......
......@@ -2,9 +2,6 @@ add_subdirectory(preferences)
add_subdirectory(toolbar)
add_library(ui
MAVLinkDecoder.cc
MAVLinkDecoder.h
QGCMapRCToParamDialog.h
QGCPluginHost.cc
QGCPluginHost.h
......
This diff is collapsed.
#pragma once
#include <QObject>
#include <QHash>
#include "MAVLinkProtocol.h"
struct SystemData {
/**
* @brief Holds mavlink system data
*/
SystemData() :
componentID(-1),
componentMulti(false),
onboardTimeOffset(0),
onboardToGCSUnixTimeOffsetAndDelay(0),
firstOnboardTime(0) {
}
int componentID; ///< Multi component detection
bool componentMulti; ///< Multi components detected
quint64 onboardTimeOffset; ///< Offset of onboard time from Unix epoch (of the receiving GCS)
qint64 onboardToGCSUnixTimeOffsetAndDelay; ///< Offset of onboard time and GCS Unix time
quint64 firstOnboardTime; ///< First seen onboard time
};
class MAVLinkDecoder : public QThread
{
Q_OBJECT
public:
MAVLinkDecoder(MAVLinkProtocol* protocol);
void run();
signals:
void textMessageReceived(int uasid, int componentid, int severity, const QString& text);
void valueChanged(const int uasId, const QString& name, const QString& unit, const QVariant& value, const quint64 msec);
void finish(); ///< Trigger a thread safe shutdown
public slots:
/** @brief Receive one message from the protocol and decode it */
void receiveMessage(LinkInterface* link,mavlink_message_t message);
protected:
/** @brief Emit the value of one message field */
void emitFieldValue(mavlink_message_t* msg, int fieldid, quint64 time);
/** @brief Shift a timestamp in Unix time if necessary */
quint64 getUnixTimeFromMs(int systemID, quint64 time);
QMap<uint16_t, bool> messageFilter; ///< Message/field names not to emit
QMap<uint16_t, bool> textMessageFilter; ///< Message/field names not to emit in text mode
QHash<int, mavlink_message_t> msgDict; ///< dictionary of all mavlink messages
QHash<int, SystemData> sysDict; ///< dictionary of all systmes
QThread* creationThread; ///< QThread on which the object is created
};
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