Commit 156c33d8 authored by Don Gagne's avatar Don Gagne
Browse files

Merge remote-tracking branch 'origin/Android64Serial' into Android64Serial

parents 59505ee9 876e0c3b
...@@ -23,8 +23,7 @@ matrix: ...@@ -23,8 +23,7 @@ matrix:
env: SPEC=linux-g++-64 CONFIG=debug env: SPEC=linux-g++-64 CONFIG=debug
services: xvfb services: xvfb
sudo: required sudo: required
- os: android - dist: trusty
dist: trusty
language: android language: android
env: SPEC=android-clang CONFIG=installer env: SPEC=android-clang CONFIG=installer
sudo: false sudo: false
......
...@@ -6,6 +6,7 @@ Note: This file only contains high level features or important fixes. ...@@ -6,6 +6,7 @@ Note: This file only contains high level features or important fixes.
### 3.6.0 - Daily Build ### 3.6.0 - Daily Build
* Compass Instrument: Add indicators for Home, COG and Next Waypoint headings.
* Log Replay: Support changing speed of playback * Log Replay: Support changing speed of playback
* Basic object avoidance added to vehicles. * Basic object avoidance added to vehicles.
* Added ability to set a joystick button to be single action or repeated action while the button is held down. * Added ability to set a joystick button to be single action or repeated action while the button is held down.
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Please see our website at <http://qgroundcontrol.org> # Please see our website at <http://qgroundcontrol.org>
# Maintainer: # Maintainer:
# Lorenz Meier <lm@inf.ethz.ch> # Lorenz Meier <lm@inf.ethz.ch>
# (c) 2009-2014 QGroundControl Developers # (c) 2009-2019 QGroundControl Developers
# License terms set in COPYING.md # License terms set in COPYING.md
# ------------------------------------------------- # -------------------------------------------------
...@@ -21,6 +21,7 @@ linux { ...@@ -21,6 +21,7 @@ linux {
message("Linux build") message("Linux build")
CONFIG += LinuxBuild CONFIG += LinuxBuild
DEFINES += __STDC_LIMIT_MACROS DEFINES += __STDC_LIMIT_MACROS
DEFINES += QGC_ENABLE_NFC RW_SUPPORT
DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_TAISYNC_ENABLED
DEFINES += QGC_GST_MICROHARD_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED
linux-clang { linux-clang {
...@@ -133,14 +134,15 @@ exists ($$PWD/.git) { ...@@ -133,14 +134,15 @@ exists ($$PWD/.git) {
contains(GIT_DESCRIBE, v[0-9]+.[0-9]+.[0-9]+) { contains(GIT_DESCRIBE, v[0-9]+.[0-9]+.[0-9]+) {
# release version "vX.Y.Z" # release version "vX.Y.Z"
GIT_VERSION = $${GIT_DESCRIBE} GIT_VERSION = $${GIT_DESCRIBE}
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
} else { } else {
# development version "Development branch:sha date" # development version "Development branch:sha date"
GIT_VERSION = "Development $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}" GIT_VERSION = "Development $${GIT_BRANCH}:$${GIT_HASH} $${GIT_TIME}"
VERSION = 0.0.0
} }
VERSION = $$replace(GIT_DESCRIBE, "v", "")
VERSION = $$replace(VERSION, "-", ".")
VERSION = $$section(VERSION, ".", 0, 3)
MacBuild { MacBuild {
MAC_VERSION = $$section(VERSION, ".", 0, 2) MAC_VERSION = $$section(VERSION, ".", 0, 2)
MAC_BUILD = $$section(VERSION, ".", 3, 3) MAC_BUILD = $$section(VERSION, ".", 3, 3)
...@@ -255,6 +257,10 @@ ReleaseBuild { ...@@ -255,6 +257,10 @@ ReleaseBuild {
} }
WindowsBuild { WindowsBuild {
*msvc* { # visual studio spec filter
# Run compilation using VS compiler using multiple threads
QMAKE_CXXFLAGS += -MP
}
# Enable function level linking and enhanced optimized debugging # Enable function level linking and enhanced optimized debugging
QMAKE_CFLAGS_RELEASE += /Gy /Zo QMAKE_CFLAGS_RELEASE += /Gy /Zo
QMAKE_CXXFLAGS_RELEASE += /Gy /Zo QMAKE_CXXFLAGS_RELEASE += /Gy /Zo
......
...@@ -92,6 +92,20 @@ exists($$MAVLINKPATH/common) { ...@@ -92,6 +92,20 @@ exists($$MAVLINKPATH/common) {
INCLUDEPATH += libs/eigen INCLUDEPATH += libs/eigen
DEFINES += NOMINMAX DEFINES += NOMINMAX
# Pairing
MacBuild {
#- Pairing is generally not supported on macOS. This is here solely for development.
exists(/usr/local/Cellar/openssl/1.0.2s/include) {
INCLUDEPATH += /usr/local/Cellar/openssl/1.0.2s/include
LIBS += -L/usr/local/Cellar/openssl/1.0.2s/lib
LIBS += -lcrypto -lz
} else {
DEFINES += QGC_DISABLE_PAIRING
}
} else {
LIBS += -lcrypto -lz
}
# #
# [REQUIRED] shapelib library # [REQUIRED] shapelib library
INCLUDEPATH += libs/shapelib INCLUDEPATH += libs/shapelib
...@@ -115,28 +129,38 @@ MacBuild { ...@@ -115,28 +129,38 @@ MacBuild {
PKGCONFIG = sdl2 PKGCONFIG = sdl2
} else:WindowsBuild { } else:WindowsBuild {
INCLUDEPATH += $$BASEDIR/libs/lib/sdl2/msvc/include INCLUDEPATH += $$BASEDIR/libs/lib/sdl2/msvc/include
INCLUDEPATH += $$BASEDIR/libs/zlib/Windows/include
contains(QT_ARCH, i386) { contains(QT_ARCH, i386) {
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Windows/x86/include
LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x86 LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x86
LIBS += -L$$BASEDIR/libs/OpenSSL/Windows/x86/lib
} else { } else {
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Windows/x64/include
LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x64 LIBS += -L$$BASEDIR/libs/lib/sdl2/msvc/lib/x64
LIBS += -L$$BASEDIR/libs/OpenSSL/Windows/x64/lib
} }
LIBS += -L$$BASEDIR/libs/zlib/Windows/libs
LIBS += \ LIBS += \
-lSDL2main \ -lSDL2main \
-lSDL2 -lSDL2 \
-lz \
-llibeay32
} }
AndroidBuild { AndroidBuild {
contains(QT_ARCH, arm) { contains(QT_ARCH, arm) {
ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libcrypto.so ANDROID_EXTRA_LIBS += $$BASEDIR/libs/OpenSSL/Android/arch-armeabi-v7a/lib/libcrypto.so
ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libssl.so ANDROID_EXTRA_LIBS += $$BASEDIR/libs/OpenSSL/Android/arch-armeabi-v7a/lib/libssl.so
LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-armeabi-v7a/include
} else:contains(QT_ARCH, arm64) { } else:contains(QT_ARCH, arm64) {
# Haven't figured out how to get 64 bit arm OpenSLL yet. This means things like terrain queries will not qork. # Haven't figured out how to get 64 bit arm OpenSLL yet. This means things like terrain queries will not qork.
#ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libcrypto.so
#ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-armeabi-v7a/lib/libssl.so
} else { } else {
ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libcrypto.so ANDROID_EXTRA_LIBS += $$BASEDIR/libs/OpenSSL/Android/arch-x86/lib/libcrypto.so
ANDROID_EXTRA_LIBS += $$BASEDIR/libs/AndroidOpenSSL/arch-x86/lib/libssl.so ANDROID_EXTRA_LIBS += $$BASEDIR/libs/OpenSSL/Android/arch-x86/lib/libssl.so
LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-x86/include
} }
} }
...@@ -169,7 +193,7 @@ contains (DEFINES, DISABLE_AIRMAP) { ...@@ -169,7 +193,7 @@ contains (DEFINES, DISABLE_AIRMAP) {
} else { } else {
AIRMAPD_PATH = $$PWD/libs/airmapd AIRMAPD_PATH = $$PWD/libs/airmapd
AIRMAP_QT_PATH = Qt.$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION} AIRMAP_QT_PATH = Qt.$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}
message(Looking for Airmap in $$AIRMAP_QT_PATH) message('Looking for Airmap in folder "$${AIRMAPD_PATH}", variant: "$$AIRMAP_QT_PATH"')
MacBuild { MacBuild {
exists($${AIRMAPD_PATH}/macOS/$$AIRMAP_QT_PATH) { exists($${AIRMAPD_PATH}/macOS/$$AIRMAP_QT_PATH) {
message("Including support for AirMap for macOS") message("Including support for AirMap for macOS")
......
...@@ -43,13 +43,13 @@ installer { ...@@ -43,13 +43,13 @@ installer {
QMAKE_POST_LINK += && rm /tmp/tmp.dmg QMAKE_POST_LINK += && rm /tmp/tmp.dmg
} }
WindowsBuild { WindowsBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi") QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi")
OTHER_FILES += deploy/qgroundcontrol_installer.nsi OTHER_FILES += deploy/qgroundcontrol_installer.nsi
} }
LinuxBuild { LinuxBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR} #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p release/package QMAKE_POST_LINK += && mkdir -p release/package
QMAKE_POST_LINK += && tar -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/' QMAKE_POST_LINK += && tar --warning=no-file-changed -cjf release/package/QGroundControl.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/'
} }
AndroidBuild { AndroidBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR} #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
......
...@@ -87,7 +87,7 @@ WindowsBuild { ...@@ -87,7 +87,7 @@ WindowsBuild {
} }
DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe)) DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe))
QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --no-compiler-runtime --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET} QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET}
} }
LinuxBuild { LinuxBuild {
......
...@@ -379,22 +379,20 @@ Item { ...@@ -379,22 +379,20 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
} }
/*
//----------------------------------------------------------------- //-----------------------------------------------------------------
//-- Recording Time / Images Captured //-- Recording Time / Images Captured
CustomLabel { QGCLabel {
text: (_cameraVideoMode && _camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING) ? _camera.recordTimeStr : "00:00:00" text: (_cameraVideoMode && _camera.videoStatus === QGCCameraControl.VIDEO_CAPTURE_STATUS_RUNNING) ? _camera.recordTimeStr : "00:00:00"
visible: _cameraVideoMode visible: _cameraVideoMode
pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
CustomLabel { QGCLabel {
text: activeVehicle && _cameraPhotoMode ? ('00000' + activeVehicle.cameraTriggerPoints.count).slice(-5) : "00000" text: activeVehicle && _cameraPhotoMode ? ('00000' + activeVehicle.cameraTriggerPoints.count).slice(-5) : "00000"
visible: _cameraPhotoMode visible: _cameraPhotoMode
pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
} }
*/
Item { Item {
height: 1 height: 1
width: 1 width: 1
......
...@@ -61,7 +61,6 @@ Item { ...@@ -61,7 +61,6 @@ Item {
property real _distance: 0.0 property real _distance: 0.0
property string _messageTitle: "" property string _messageTitle: ""
property string _messageText: "" property string _messageText: ""
property bool _showAttitude: true
function secondsToHHMMSS(timeS) { function secondsToHHMMSS(timeS) {
var sec_num = parseInt(timeS, 10); var sec_num = parseInt(timeS, 10);
...@@ -260,74 +259,77 @@ Item { ...@@ -260,74 +259,77 @@ Item {
anchors.bottomMargin: ScreenTools.defaultFontPixelWidth anchors.bottomMargin: ScreenTools.defaultFontPixelWidth
anchors.right: attitudeIndicator.visible ? attitudeIndicator.left : parent.right anchors.right: attitudeIndicator.visible ? attitudeIndicator.left : parent.right
anchors.rightMargin: attitudeIndicator.visible ? -ScreenTools.defaultFontPixelWidth : ScreenTools.defaultFontPixelWidth anchors.rightMargin: attitudeIndicator.visible ? -ScreenTools.defaultFontPixelWidth : ScreenTools.defaultFontPixelWidth
GridLayout {
id: vehicleStatusGrid readonly property bool _showGps: CustomQuickInterface.showAttitudeWidget
columnSpacing: ScreenTools.defaultFontPixelWidth * 1.5
GridLayout {
id: vehicleStatusGrid
columnSpacing: ScreenTools.defaultFontPixelWidth * 1.5
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5 rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columns: 7 columns: 7
anchors.centerIn: parent anchors.centerIn: parent
//-- Chronometer
QGCColoredImage { //-- Latitude
QGCLabel {
height: _indicatorsHeight height: _indicatorsHeight
width: height width: height
source: "/custom/img/chronometer.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text color: qgcPal.text
} text: "Lat:"
QGCLabel { visible: vehicleIndicator._showGps
text: {
if(activeVehicle)
return secondsToHHMMSS(activeVehicle.getFact("flightTime").value)
return "00:00:00"
} }
color: _indicatorsColor QGCLabel {
font.pointSize: ScreenTools.smallFontPointSize id: firstLabel
Layout.fillWidth: true text: activeVehicle ? activeVehicle.gps.lat.value.toFixed(activeVehicle.gps.lat.decimalPlaces) : "-"
Layout.minimumWidth: indicatorValueWidth color: _indicatorsColor
horizontalAlignment: Text.AlignRight font.pointSize: ScreenTools.smallFontPointSize
} Layout.fillWidth: true
//-- Ground Speed Layout.minimumWidth: indicatorValueWidth
QGCColoredImage { horizontalAlignment: Text.AlignLeft
visible: vehicleIndicator._showGps
}
//-- Longitude
QGCLabel {
height: _indicatorsHeight height: _indicatorsHeight
width: height width: height
source: "/custom/img/horizontal_speed.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text color: qgcPal.text
text: "Lon:"
visible: vehicleIndicator._showGps
} }
QGCLabel { QGCLabel {
text: activeVehicle ? activeVehicle.groundSpeed.value.toFixed(1) + ' ' + activeVehicle.groundSpeed.units : "0.0" text: activeVehicle ? activeVehicle.gps.lon.value.toFixed(activeVehicle.gps.lon.decimalPlaces) : "-"
color: _indicatorsColor color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: firstLabel.horizontalAlignment
visible: vehicleIndicator._showGps
} }
//-- Vertical Speed //-- HDOP
QGCColoredImage { QGCLabel {
height: _indicatorsHeight height: _indicatorsHeight
width: height width: height
source: "/custom/img/vertical_speed.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text color: qgcPal.text
text: "HDOP:"
visible: vehicleIndicator._showGps
} }
QGCLabel { QGCLabel {
text: activeVehicle ? activeVehicle.climbRate.value.toFixed(1) + ' ' + activeVehicle.climbRate.units : "0.0" text: activeVehicle ? activeVehicle.gps.hdop.value.toFixed(activeVehicle.gps.hdop.decimalPlaces) : "-"
color: _indicatorsColor color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: firstLabel.horizontalAlignment
visible: vehicleIndicator._showGps
} }
//-- Compass //-- Compass
Item { Item {
Layout.rowSpan: 2 Layout.rowSpan: 3
Layout.column: 6
Layout.minimumWidth: mainIsMap ? parent.height * 1.25 : 0 Layout.minimumWidth: mainIsMap ? parent.height * 1.25 : 0
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
...@@ -395,6 +397,66 @@ Item { ...@@ -395,6 +397,66 @@ Item {
} }
} }
//-- Second Row //-- Second Row
//-- Chronometer
QGCColoredImage {
height: _indicatorsHeight
width: height
source: "/custom/img/chronometer.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text
}
QGCLabel {
text: {
if(activeVehicle)
return secondsToHHMMSS(activeVehicle.getFact("flightTime").value)
return "00:00:00"
}
color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: firstLabel.horizontalAlignment
}
//-- Ground Speed
QGCColoredImage {
height: _indicatorsHeight
width: height
source: "/custom/img/horizontal_speed.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text
}
QGCLabel {
text: activeVehicle ? activeVehicle.groundSpeed.value.toFixed(1) + ' ' + activeVehicle.groundSpeed.units : "0.0"
color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: firstLabel.horizontalAlignment
}
//-- Vertical Speed
QGCColoredImage {
height: _indicatorsHeight
width: height
source: "/custom/img/vertical_speed.svg"
fillMode: Image.PreserveAspectFit
sourceSize.height: height
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text
}
QGCLabel {
text: activeVehicle ? activeVehicle.climbRate.value.toFixed(1) + ' ' + activeVehicle.climbRate.units : "0.0"
color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: firstLabel.horizontalAlignment
}
//-- Third Row
//-- Odometer //-- Odometer
QGCColoredImage { QGCColoredImage {
height: _indicatorsHeight height: _indicatorsHeight
...@@ -412,9 +474,9 @@ Item { ...@@ -412,9 +474,9 @@ Item {
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: firstLabel.horizontalAlignment
} }
//-- Altitude //-- Altitude
QGCColoredImage { QGCColoredImage {
height: _indicatorsHeight height: _indicatorsHeight
width: height width: height
...@@ -424,16 +486,16 @@ Item { ...@@ -424,16 +486,16 @@ Item {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text color: qgcPal.text
} }
QGCLabel { QGCLabel {
text: _altitude text: _altitude
color: _indicatorsColor color: _indicatorsColor
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: firstLabel.horizontalAlignment
} }
//-- Distance //-- Distance
QGCColoredImage { QGCColoredImage {
height: _indicatorsHeight height: _indicatorsHeight
width: height width: height
...@@ -443,19 +505,19 @@ Item { ...@@ -443,19 +505,19 @@ Item {
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
color: qgcPal.text color: qgcPal.text
} }
QGCLabel { QGCLabel {
text: _distance ? _distanceStr : noGPS text: _distance ? _distanceStr : noGPS
color: _distance ? _indicatorsColor : qgcPal.colorOrange color: _distance ? _indicatorsColor : qgcPal.colorOrange
font.pointSize: ScreenTools.smallFontPointSize font.pointSize: ScreenTools.smallFontPointSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: indicatorValueWidth Layout.minimumWidth: indicatorValueWidth
horizontalAlignment: Text.AlignRight horizontalAlignment: firstLabel.horizontalAlignment
} }
} }
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
onDoubleClicked: _showAttitude = !_showAttitude onDoubleClicked: CustomQuickInterface.showAttitudeWidget = !CustomQuickInterface.showAttitudeWidget
} }
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
...@@ -464,7 +526,7 @@ Item { ...@@ -464,7 +526,7 @@ Item {
color: qgcPal.window color: qgcPal.window
width: attitudeIndicator.width * 0.5 width: attitudeIndicator.width * 0.5
height: vehicleIndicator.height height: vehicleIndicator.height
visible: _showAttitude visible: CustomQuickInterface.showAttitudeWidget
anchors.top: vehicleIndicator.top anchors.top: vehicleIndicator.top
anchors.left: vehicleIndicator.right anchors.left: vehicleIndicator.right
} }
...@@ -478,7 +540,7 @@ Item { ...@@ -478,7 +540,7 @@ Item {
width: height width: height
radius: height * 0.5 radius: height * 0.5
color: qgcPal.windowShade color: qgcPal.windowShade
visible: _showAttitude visible: CustomQuickInterface.showAttitudeWidget
CustomAttitudeWidget { CustomAttitudeWidget {
size: parent.height * 0.95 size: parent.height * 0.95
vehicle: activeVehicle vehicle: activeVehicle
......
...@@ -34,6 +34,7 @@ Item { ...@@ -34,6 +34,7 @@ Item {
anchors.left: parent.left anchors.left: parent.left
QGCColoredImage { QGCColoredImage {
id: menuEdge id: menuEdge
visible: !QGroundControl.supportsPairing || !QGroundControl.settingsManager.appSettings.usePairing.rawValue
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: ScreenTools.defaultFontPixelHeight height: ScreenTools.defaultFontPixelHeight
width: height width: height
...@@ -43,11 +44,19 @@ Item { ...@@ -43,11 +44,19 @@ Item {
color: qgcPal.buttonText color: qgcPal.buttonText
} }
QGCLabel { QGCLabel {
visible: menuEdge.visible
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: qsTr("Waiting for a vehicle") text: qsTr("Waiting for a vehicle")
font.pointSize: ScreenTools.mediumFontPointSize font.pointSize: ScreenTools.mediumFontPointSize
font.family: ScreenTools.demiboldFontFamily font.family: ScreenTools.demiboldFontFamily
} }
Loader {
visible: !menuEdge.visible
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.margins: _indicatorMargins
source: "/toolbar/PairingIndicator.qml"
}
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-- Toolbar Indicators //-- Toolbar Indicators
......
...@@ -224,6 +224,7 @@ CustomPlugin::createRootWindow(QObject *parent) ...@@ -224,6 +224,7 @@ CustomPlugin::createRootWindow(QObject *parent)
bool bool
CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& metaData) CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& metaData)
{ {
bool parentResult = QGCCorePlugin::adjustSettingMetaData(settingsGroup, metaData);
if (settingsGroup == AppSettings::settingsGroup) { if (settingsGroup == AppSettings::settingsGroup) {
if (metaData.name() == AppSettings::appFontPointSizeName) { if (metaData.name() == AppSettings::appFontPointSizeName) {
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
...@@ -233,10 +234,10 @@ CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData& ...@@ -233,10 +234,10 @@ CustomPlugin::adjustSettingMetaData(const QString& settingsGroup, FactMetaData&
} else if (metaData.name() == AppSettings::indoorPaletteName) { } else if (metaData.name() == AppSettings::indoorPaletteName) {
QVariant indoorPalette = 1; QVariant indoorPalette = 1;
metaData.setRawDefaultValue(indoorPalette); metaData.setRawDefaultValue(indoorPalette);
return true; parentResult = true;
} }
} }
return true; return parentResult;
} }
const QColor CustomPlugin::_windowShadeEnabledLightColor("#FFFFFF"); const QColor CustomPlugin::_windowShadeEnabledLightColor("#FFFFFF");
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
static const char* kGroupName = "CustomSettings"; static const char* kGroupName = "CustomSettings";
static const char* kShowGimbalCtl = "ShowGimbalCtl"; static const char* kShowGimbalCtl = "ShowGimbalCtl";
static const char* kShowAttitudeWidget = "ShowAttitudeWidget";
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CustomQuickInterface::CustomQuickInterface(QObject* parent) CustomQuickInterface::CustomQuickInterface(QObject* parent)
...@@ -45,7 +46,8 @@ CustomQuickInterface::init() ...@@ -45,7 +46,8 @@ CustomQuickInterface::init()
{ {
QSettings settings; QSettings settings;
settings.beginGroup(kGroupName); settings.beginGroup(kGroupName);
_showGimbalControl = settings.value(kShowGimbalCtl, true).toBool(); _showGimbalControl = settings.value(kShowGimbalCtl, false).toBool();
_showAttitudeWidget = settings.value(kShowAttitudeWidget, false).toBool();
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -60,3 +62,16 @@ CustomQuickInterface::setShowGimbalControl(bool set) ...@@ -60,3 +62,16 @@ CustomQuickInterface::setShowGimbalControl(bool set)
emit showGimbalControlChanged(); emit showGimbalControlChanged();
} }
} }
//-----------------------------------------------------------------------------
void
CustomQuickInterface::setShowAttitudeWidget(bool set)
{
if(_showAttitudeWidget != set) {
_showAttitudeWidget = set;
QSettings settings;
settings.beginGroup(kGroupName);
settings.setValue(kShowAttitudeWidget,set);
emit showAttitudeWidgetChanged();
}
}
...@@ -29,12 +29,20 @@ public: ...@@ -29,12 +29,20 @@ public:
CustomQuickInterface(QObject* parent = nullptr); CustomQuickInterface(QObject* parent = nullptr);
~CustomQuickInterface(); ~CustomQuickInterface();
Q_PROPERTY(bool showGimbalControl READ showGimbalControl WRITE setShowGimbalControl NOTIFY showGimbalControlChanged) Q_PROPERTY(bool showGimbalControl READ showGimbalControl WRITE setShowGimbalControl NOTIFY showGimbalControlChanged)
Q_PROPERTY(bool showAttitudeWidget READ showAttitudeWidget WRITE setShowAttitudeWidget NOTIFY showAttitudeWidgetChanged)
bool showGimbalControl () { return _showGimbalControl; } bool showGimbalControl () { return _showGimbalControl; }
void setShowGimbalControl (bool set); void setShowGimbalControl (bool set);
void init (); void init ();
bool showAttitudeWidget () { return _showAttitudeWidget; }
void setShowAttitudeWidget (bool set);
signals: signals:
void showGimbalControlChanged (); void showGimbalControlChanged ();
void showAttitudeWidgetChanged();
private: private:
bool _showGimbalControl = true; bool _showGimbalControl = true;
bool _showAttitudeWidget = false;
}; };
...@@ -55,6 +55,9 @@ CustomFirmwarePlugin::toolBarIndicators(const Vehicle* vehicle) ...@@ -55,6 +55,9 @@ CustomFirmwarePlugin::toolBarIndicators(const Vehicle* vehicle)
{ {
Q_UNUSED(vehicle); Q_UNUSED(vehicle);
if(_toolBarIndicatorList.size() == 0) { if(_toolBarIndicatorList.size() == 0) {
#if defined(QGC_ENABLE_PAIRING)
_toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/PairingIndicator.qml")));
#endif
_toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSIndicator.qml"))); _toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/GPSIndicator.qml")));
_toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/TelemetryRSSIIndicator.qml"))); _toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/TelemetryRSSIIndicator.qml")));
_toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/RCRSSIIndicator.qml"))); _toolBarIndicatorList.append(QVariant::fromValue(QUrl::fromUserInput("qrc:/toolbar/RCRSSIIndicator.qml")));
......
/* crypto/aes/aes.h */
/* ====================================================================
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
*/
#ifndef HEADER_AES_H
# define HEADER_AES_H
# include <openssl/opensslconf.h>
# ifdef OPENSSL_NO_AES
# error AES is disabled.
# endif
# include <stddef.h>
# define AES_ENCRYPT 1
# define AES_DECRYPT 0
/*
* Because array size can't be a const in C, the following two are macros.
* Both sizes are in bytes.
*/
# define AES_MAXNR 14
# define AES_BLOCK_SIZE 16
#ifdef __cplusplus
extern "C" {
#endif
/* This should be a hidden type, but EVP requires that the size be known */
struct aes_key_st {
# ifdef AES_LONG
unsigned long rd_key[4 * (AES_MAXNR + 1)];
# else
unsigned int rd_key[4 * (AES_MAXNR + 1)];
# endif
int rounds;
};
typedef struct aes_key_st AES_KEY;
const char *AES_options(void);
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int private_AES_set_encrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
int private_AES_set_decrypt_key(const unsigned char *userKey, const int bits,
AES_KEY *key);
void AES_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
void AES_decrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key);
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
const AES_KEY *key, const int enc);
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num, const int enc);
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, int *num);
void AES_ctr128_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char ivec[AES_BLOCK_SIZE],
unsigned char ecount_buf[AES_BLOCK_SIZE],
unsigned int *num);
/* NB: the IV is _two_ blocks long */
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
unsigned char *ivec, const int enc);
/* NB: the IV is _four_ blocks long */
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
size_t length, const AES_KEY *key,
const AES_KEY *key2, const unsigned char *ivec,
const int enc);
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
unsigned char *out,
const unsigned char *in, unsigned int inlen);
#ifdef __cplusplus
}
#endif
#endif /* !HEADER_AES_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* crypto/bf/blowfish.h */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
#ifndef HEADER_BLOWFISH_H
# define HEADER_BLOWFISH_H
# include <openssl/e_os2.h>
#ifdef __cplusplus
extern "C" {
#endif
# ifdef OPENSSL_NO_BF
# error BF is disabled.
# endif
# define BF_ENCRYPT 1
# define BF_DECRYPT 0
/*-
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* ! BF_LONG has to be at least 32 bits wide. If it's wider, then !
* ! BF_LONG_LOG2 has to be defined along. !
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/
# if defined(__LP32__)
# define BF_LONG unsigned long
# elif defined(OPENSSL_SYS_CRAY) || defined(__ILP64__)
# define BF_LONG unsigned long
# define BF_LONG_LOG2 3
/*
* _CRAY note. I could declare short, but I have no idea what impact
* does it have on performance on none-T3E machines. I could declare
* int, but at least on C90 sizeof(int) can be chosen at compile time.
* So I've chosen long...
* <appro@fy.chalmers.se>
*/
# else
# define BF_LONG unsigned int
# endif
# define BF_ROUNDS 16
# define BF_BLOCK 8
typedef struct bf_key_st {
BF_LONG P[BF_ROUNDS + 2];
BF_LONG S[4 * 256];
} BF_KEY;
# ifdef OPENSSL_FIPS
void private_BF_set_key(BF_KEY *key, int len, const unsigned char *data);
# endif
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
void BF_encrypt(BF_LONG *data, const BF_KEY *key);
void BF_decrypt(BF_LONG *data, const BF_KEY *key);
void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
const BF_KEY *key, int enc);
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
const BF_KEY *schedule, unsigned char *ivec, int enc);
void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const BF_KEY *schedule,
unsigned char *ivec, int *num, int enc);
void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
long length, const BF_KEY *schedule,
unsigned char *ivec, int *num);
const char *BF_options(void);
#ifdef __cplusplus
}
#endif
#endif
Supports Markdown
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