Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AirMap support #10726

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ thirdParty/qserialport/lib/
libs/thirdParty/libxbee/lib/
GeneratedFiles/
gstreamer-1.0-android*
src/Airmap/Airmap_api_key.h
localization/qgroundcontrol/

*.autosave
Expand Down Expand Up @@ -87,5 +86,3 @@ src/latex/
Qt*-linux*.tar.*

.vs/

libs/airmapd/include/boost
59 changes: 0 additions & 59 deletions QGCExternalLibs.pri
Original file line number Diff line number Diff line change
Expand Up @@ -277,62 +277,3 @@ contains (DEFINES, DISABLE_ZEROCONF) {
} else {
message("Skipping support for Zeroconf (unsupported platform)")
}

#
# [OPTIONAL] AirMap Support
#
contains (DEFINES, DISABLE_AIRMAP) {
message("Skipping support for AirMap (manual override from command line)")
# Otherwise the user can still disable this feature in the user_config.pri file.
} else:exists(user_config.pri):infile(user_config.pri, DEFINES, DISABLE_AIRMAP) {
message("Skipping support for AirMap (manual override from user_config.pri)")
} else {
AIRMAP_PLATFORM_SDK_PATH = $${OUT_PWD}/libs/airmap-platform-sdk
AIRMAP_QT_PATH = Qt.$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}
message("Including support for AirMap")
MacBuild {
exists("$${AIRMAPD_PATH}/macOS/$$AIRMAP_QT_PATH") {
message("Including support for AirMap for macOS")
LIBS += -L$${AIRMAPD_PATH}/macOS/$$AIRMAP_QT_PATH -lairmap-qt
DEFINES += QGC_AIRMAP_ENABLED
}
} else:LinuxBuild {
AIRMAP_PLATFORM_SDK_ARCH = ""
contains (QT_ARCH, arm64) {
AIRMAP_PLATFORM_SDK_ARCH = "aarch64"
} else:contains (QT_ARCH, x86_64) {
AIRMAP_PLATFORM_SDK_ARCH = "x86_64"
}
isEmpty( AIRMAP_PLATFORM_SDK_ARCH ) {
message($$sprintf("Skipping support for Airmap (unsupported architecture: '%1')", $$QT_ARCH))
} else {
#-- Download and install platform-sdk libs and headers iff they're not already in the build directory
AIRMAP_PLATFORM_SDK_URL = "https://github.com/airmap/platform-sdk/releases/download/2.0.1/airmap-platform-sdk-2.0.1-Linux-$${AIRMAP_PLATFORM_SDK_ARCH}.deb"
AIRMAP_PLATFORM_SDK_FILEPATH = "$${OUT_PWD}/airmap-platform-sdk.deb"
AIRMAP_PLATFORM_SDK_INSTALL_DIR = "tmp"

airmap_platform_sdk_install.target = $${AIRMAP_PLATFORM_SDK_PATH}/include/airmap
airmap_platform_sdk_install.commands = \
rm -rf $${AIRMAP_PLATFORM_SDK_PATH} && \
mkdir -p "$${AIRMAP_PLATFORM_SDK_PATH}/linux/$${AIRMAP_QT_PATH}" && \
mkdir -p "$${AIRMAP_PLATFORM_SDK_PATH}/include/airmap" && \
mkdir -p "$${AIRMAP_PLATFORM_SDK_PATH}/$${AIRMAP_PLATFORM_SDK_INSTALL_DIR}" && \
curl --location --output "$${AIRMAP_PLATFORM_SDK_FILEPATH}" "$${AIRMAP_PLATFORM_SDK_URL}" && \
ar p "$${AIRMAP_PLATFORM_SDK_FILEPATH}" data.tar.gz | tar xvz -C "$${AIRMAP_PLATFORM_SDK_PATH}/$${AIRMAP_PLATFORM_SDK_INSTALL_DIR}/" --strip-components=1 && \
mv -u "$${AIRMAP_PLATFORM_SDK_PATH}/$${AIRMAP_PLATFORM_SDK_INSTALL_DIR}/usr/lib/$${AIRMAP_PLATFORM_SDK_ARCH}-linux-gnu/*" "$${AIRMAP_PLATFORM_SDK_PATH}/linux/$${AIRMAP_QT_PATH}/" && \
mv -u "$${AIRMAP_PLATFORM_SDK_PATH}/$${AIRMAP_PLATFORM_SDK_INSTALL_DIR}/usr/include/airmap/*" "$${AIRMAP_PLATFORM_SDK_PATH}/include/airmap/" && \
rm -rf "$${AIRMAP_PLATFORM_SDK_PATH}/$${AIRMAP_PLATFORM_SDK_INSTALL_DIR}" && \
rm "$${AIRMAP_PLATFORM_SDK_FILEPATH}"
airmap_platform_sdk_install.depends =
QMAKE_EXTRA_TARGETS += airmap_platform_sdk_install
PRE_TARGETDEPS += $$airmap_platform_sdk_install.target

LIBS += -L$${AIRMAP_PLATFORM_SDK_PATH}/linux/$${AIRMAP_QT_PATH} -lairmap-cpp
DEFINES += QGC_AIRMAP_ENABLED
}
}
contains (DEFINES, QGC_AIRMAP_ENABLED) {
INCLUDEPATH += \
$${AIRMAP_PLATFORM_SDK_PATH}/include
}
}
15 changes: 0 additions & 15 deletions QGCPostLinkCommon.pri
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,10 @@ MacBuild {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.framework $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
} else {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.framework $${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmap-platform-sdk/macOS/$$AIRMAP_QT_PATH/* $${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $${TARGET}.app/Contents/MacOS/$${TARGET}
}
}
}

Expand Down Expand Up @@ -160,11 +150,6 @@ LinuxBuild {
# QT_INSTALL_QML
QMAKE_POST_LINK += && $$QMAKE_COPY -n --dereference --recursive $$[QT_INSTALL_QML] $$DESTDIR/Qt/

# Airmap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && $$QMAKE_COPY $$OUT_PWD/libs/airmap-platform-sdk/linux/$$AIRMAP_QT_PATH/libairmap-cpp.so.2.0.1 $$DESTDIR/Qt/libs/
}

# QGroundControl start script
contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) | !exists($$PWD/custom/custom.pri) {
QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/deploy/qgroundcontrol-start.sh $$DESTDIR
Expand Down
1 change: 0 additions & 1 deletion custom-example/qgroundcontrol.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@
<file alias="QGroundControl/FactControls/qmldir">../src/QmlControls/QGroundControl/FactControls/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">../src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">../src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewAirspaceIndicator.qml">../src/FlightDisplay/FlyViewAirspaceIndicator.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyView.qml">../src/FlightDisplay/FlyView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewInstrumentPanel.qml">../src/FlightDisplay/FlyViewInstrumentPanel.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMap.qml">../src/FlightDisplay/FlyViewMap.qml</file>
Expand Down
5 changes: 1 addition & 4 deletions doc/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,11 @@ FILE_PATTERNS = *.c \
*.py \
*.qml
RECURSIVE = YES
EXCLUDE = ../src/Airmap/QJsonWebToken \
../src/PairingManager/NfcLibrary \
EXCLUDE = ../src/PairingManager/NfcLibrary \
../src/PairingManager/NfcTask \
../src/PairingManager/TML \
../src/GPS/Drivers \
../src/GPS/RTCM \
../src/Airmap/QJsonWebToken \
../src/Airmap/README.md \
../src/VideoStreaming/README.md
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = *Test.*
Expand Down
117 changes: 0 additions & 117 deletions qgroundcontrol.pro
Original file line number Diff line number Diff line change
Expand Up @@ -1349,123 +1349,6 @@ contains (DEFINES, QGC_GST_MICROHARD_DISABLED) {
src/Microhard/MicrohardSettings.cc \
}
}
#-------------------------------------------------------------------------------------
# AirMap

contains (DEFINES, QGC_AIRMAP_ENABLED) {

#-- These should be always enabled but not yet
INCLUDEPATH += \
src/AirspaceManagement

HEADERS += \
src/AirspaceManagement/AirspaceAdvisoryProvider.h \
src/AirspaceManagement/AirspaceFlightPlanProvider.h \
src/AirspaceManagement/AirspaceManager.h \
src/AirspaceManagement/AirspaceRestriction.h \
src/AirspaceManagement/AirspaceRestrictionProvider.h \
src/AirspaceManagement/AirspaceRulesetsProvider.h \
src/AirspaceManagement/AirspaceVehicleManager.h \
src/AirspaceManagement/AirspaceWeatherInfoProvider.h \

SOURCES += \
src/AirspaceManagement/AirspaceAdvisoryProvider.cc \
src/AirspaceManagement/AirspaceFlightPlanProvider.cc \
src/AirspaceManagement/AirspaceManager.cc \
src/AirspaceManagement/AirspaceRestriction.cc \
src/AirspaceManagement/AirspaceRestrictionProvider.cc \
src/AirspaceManagement/AirspaceRulesetsProvider.cc \
src/AirspaceManagement/AirspaceVehicleManager.cc \
src/AirspaceManagement/AirspaceWeatherInfoProvider.cc \

#-- This is the AirMap implementation of the above
RESOURCES += \
src/Airmap/airmap.qrc

INCLUDEPATH += \
src/Airmap \
src/Airmap/services

HEADERS += \
src/Airmap/AirMapAdvisoryManager.h \
src/Airmap/AirMapFlightManager.h \
src/Airmap/AirMapFlightPlanManager.h \
src/Airmap/AirMapManager.h \
src/Airmap/AirMapRestrictionManager.h \
src/Airmap/AirMapRulesetsManager.h \
src/Airmap/AirMapSettings.h \
src/Airmap/AirMapSharedState.h \
src/Airmap/AirMapTelemetry.h \
src/Airmap/AirMapTrafficMonitor.h \
src/Airmap/AirMapVehicleManager.h \
src/Airmap/AirMapWeatherInfoManager.h \
src/Airmap/LifetimeChecker.h \
src/Airmap/services/advisory.h \
src/Airmap/services/aircrafts.h \
src/Airmap/services/airspaces.h \
src/Airmap/services/authenticator.h \
src/Airmap/services/client.h \
src/Airmap/services/dispatcher.h \
src/Airmap/services/flight_plans.h \
src/Airmap/services/flights.h \
src/Airmap/services/logger.h \
src/Airmap/services/pilots.h \
src/Airmap/services/rulesets.h \
src/Airmap/services/status.h \
src/Airmap/services/telemetry.h \
src/Airmap/services/traffic.h \
src/Airmap/services/types.h \

SOURCES += \
src/Airmap/AirMapAdvisoryManager.cc \
src/Airmap/AirMapFlightManager.cc \
src/Airmap/AirMapFlightPlanManager.cc \
src/Airmap/AirMapManager.cc \
src/Airmap/AirMapRestrictionManager.cc \
src/Airmap/AirMapRulesetsManager.cc \
src/Airmap/AirMapSettings.cc \
src/Airmap/AirMapSharedState.cc \
src/Airmap/AirMapTelemetry.cc \
src/Airmap/AirMapTrafficMonitor.cc \
src/Airmap/AirMapVehicleManager.cc \
src/Airmap/AirMapWeatherInfoManager.cc \
src/Airmap/services/advisory.cpp \
src/Airmap/services/aircrafts.cpp \
src/Airmap/services/airspaces.cpp \
src/Airmap/services/authenticator.cpp \
src/Airmap/services/client.cpp \
src/Airmap/services/dispatcher.cpp \
src/Airmap/services/flight_plans.cpp \
src/Airmap/services/flights.cpp \
src/Airmap/services/logger.cpp \
src/Airmap/services/pilots.cpp \
src/Airmap/services/rulesets.cpp \
src/Airmap/services/status.cpp \
src/Airmap/services/telemetry.cpp \
src/Airmap/services/traffic.cpp \
src/Airmap/services/types.cpp \

#-- Do we have an API key?
exists(src/Airmap/Airmap_api_key.h) {
message("Using compile time Airmap API key")
HEADERS += \
src/Airmap/Airmap_api_key.h
DEFINES += QGC_AIRMAP_KEY_AVAILABLE
}

include(src/Airmap/QJsonWebToken/src/qjsonwebtoken.pri)

} else {
#-- Dummies
INCLUDEPATH += \
src/Airmap/dummy
RESOURCES += \
src/Airmap/dummy/airmap_dummy.qrc
HEADERS += \
src/Airmap/dummy/AirspaceManager.h
SOURCES += \
src/Airmap/dummy/AirspaceManager.cc
}

#-------------------------------------------------------------------------------------
# Video Streaming
Expand Down
1 change: 0 additions & 1 deletion qgroundcontrol.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,6 @@
<file alias="QGroundControl/FactControls/qmldir">src/QmlControls/QGroundControl/FactControls/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewAirspaceIndicator.qml">src/FlightDisplay/FlyViewAirspaceIndicator.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyView.qml">src/FlightDisplay/FlyView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewCustomLayer.qml">src/FlightDisplay/FlyViewCustomLayer.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewInstrumentPanel.qml">src/FlightDisplay/FlyViewInstrumentPanel.qml</file>
Expand Down
1 change: 0 additions & 1 deletion src/ADSB/ADSBVehicle.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ADSBVehicle : public QObject
QElapsedTimer _lastUpdateTimer;

static constexpr qint64 expirationTimeoutMs = 120000; ///< timeout with no update in ms after which the vehicle is removed.
///< AirMap sends updates for each vehicle every second.
};

Q_DECLARE_METATYPE(ADSBVehicle::ADSBVehicleInfo_t)
Expand Down
55 changes: 0 additions & 55 deletions src/Airmap/AirMap.SettingsGroup.json

This file was deleted.

Loading