diff --git a/custom/CMakeLists.txt b/custom/CMakeLists.txt new file mode 100644 index 000000000000..afac40c8b6f1 --- /dev/null +++ b/custom/CMakeLists.txt @@ -0,0 +1,70 @@ +message(STATUS "QGC: Adding Custom Plugin") + +if(ANDROID) + set(CUSTOM_ANDROID_DIR "${CMAKE_SOURCE_DIR}/custom/android") + if(EXISTS "${CUSTOM_ANDROID_DIR}") + file(GLOB CUSTOM_ANDROID_FILES "${CUSTOM_ANDROID_DIR}/*") + if(CUSTOM_ANDROID_FILES) + message(STATUS "QGC: Custom Android package template found. Overlaying custom files...") + set(DEFAULT_ANDROID_DIR "${CMAKE_SOURCE_DIR}/android") + set(FINAL_ANDROID_DIR "${CMAKE_BINARY_DIR}/custom/android") + file(COPY "${DEFAULT_ANDROID_DIR}/." DESTINATION "${FINAL_ANDROID_DIR}") + file(COPY "${CUSTOM_ANDROID_DIR}/." DESTINATION "${FINAL_ANDROID_DIR}") + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS + "${DEFAULT_ANDROID_DIR}/" + "${CUSTOM_ANDROID_DIR}/" + ) + set(QGC_ANDROID_PACKAGE_SOURCE_DIR "${FINAL_ANDROID_DIR}" CACHE PATH "Path to a custom Android package template" FORCE) + message(STATUS "QGC: Android package template path will be set to: ${QGC_ANDROID_PACKAGE_SOURCE_DIR}") + else() + message(STATUS "QGC: Custom Android package template empty. Using default.") + endif() + else() + message(STATUS "QGC: No custom Android package template found. Using default.") + endif() +endif() + +# Our own, custom resources +list(APPEND CUSTOM_RESOURCES + ${CMAKE_CURRENT_SOURCE_DIR}/custom.qrc +) +set(QGC_RESOURCES ${QGC_RESOURCES} ${CUSTOM_RESOURCES} CACHE STRING "Paths to .qrc Resources" FORCE) + +set(QML_IMPORT_PATH ${QML_IMPORT_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/res" CACHE STRING "Extra qml import paths" FORCE) + +qt_add_library(CustomModule STATIC) + +set_source_files_properties(res/Custom/Widgets/CustomArtificialHorizon.qml PROPERTIES QT_RESOURCE_ALIAS CustomArtificialHorizon.qml) +set_source_files_properties(res/Custom/Widgets/CustomAttitudeWidget.qml PROPERTIES QT_RESOURCE_ALIAS CustomAttitudeWidget.qml) +set_source_files_properties(res/Custom/Widgets/CustomIconButton.qml PROPERTIES QT_RESOURCE_ALIAS CustomIconButton.qml) +set_source_files_properties(res/Custom/Widgets/CustomOnOffSwitch.qml PROPERTIES QT_RESOURCE_ALIAS CustomOnOffSwitch.qml) +set_source_files_properties(res/Custom/Widgets/CustomQuickButton.qml PROPERTIES QT_RESOURCE_ALIAS CustomQuickButton.qml) +set_source_files_properties(res/Custom/Widgets/CustomSignalStrength.qml PROPERTIES QT_RESOURCE_ALIAS CustomSignalStrength.qml) +set_source_files_properties(res/Custom/Widgets/CustomToolBarButton.qml PROPERTIES QT_RESOURCE_ALIAS CustomToolBarButton.qml) +set_source_files_properties(res/Custom/Widgets/CustomVehicleButton.qml PROPERTIES QT_RESOURCE_ALIAS CustomVehicleButton.qml) + +qt_add_qml_module(CustomModule + URI Custom.Widgets + VERSION 1.0 + RESOURCE_PREFIX /qml + QML_FILES + res/Custom/Widgets/CustomArtificialHorizon.qml + res/Custom/Widgets/CustomAttitudeWidget.qml + res/Custom/Widgets/CustomIconButton.qml + res/Custom/Widgets/CustomOnOffSwitch.qml + res/Custom/Widgets/CustomQuickButton.qml + res/Custom/Widgets/CustomSignalStrength.qml + res/Custom/Widgets/CustomToolBarButton.qml + res/Custom/Widgets/CustomVehicleButton.qml + NO_PLUGIN +) + +set(CUSTOM_LIBRARIES + CustomModule # Explicitly link QML module, needed by Qt 6.6.3, TODO: Remove when support for this version is dropped + CACHE INTERNAL "" FORCE +) + +set(CUSTOM_INCLUDE_DIRECTORIES + ${CMAKE_CURRENT_SOURCE_DIR}/src + CACHE INTERNAL "" FORCE +) diff --git a/custom/README.jpg b/custom/README.jpg new file mode 100644 index 000000000000..ea4f0c77a8c1 Binary files /dev/null and b/custom/README.jpg differ diff --git a/custom/README.md b/custom/README.md new file mode 100644 index 000000000000..13c7012fc6e9 --- /dev/null +++ b/custom/README.md @@ -0,0 +1,57 @@ +# QGroundControl Ground Control Station + +## Custom Build Example + +To build this sample custom version: + +* Clean you build directory of any previous build +* Rename the directory from `custom-example` to `custom` +* Change to the `custom` directory +* Build QGC + +![Custom Build Screenshot](README.jpg) + +More details on what a custom build is and how to create your own can be found in the [QGC Dev Guide](https://dev.qgroundcontrol.com/en/custom_build/custom_build.html). + +The main features of this example: + +* Assumes an "Off The Shelf" purchased commercial vehicle. This means most vehicle setup is hidden from the user since they should mostly never need to adjust those things. They would be set up correctly by the vehicle producing company prior to sale. +* The above assumption cause the QGC UI to adjust and not show various things. Providing an even simpler experience to the user. +* The full experience continues to be available in "Advanced Mode". +* Brands the build with various custom images and custom color palette which matches corporate branding of the theoretical commercial company this build is for. +* Customizes portions of the interface such as you can see in the above screenshot which shows a custom instrument widget replacing the standard QGC ui. +* It also overrides various QGC Application settings to hide some settings the users shouldn't modify as well as adjusting defaults for others. +* The source code is fully commented to explain what and why it is doing things. + +## Make installer on Windows + +- get source code + ``` + git clone --recursive -j8 git@github.com:IOES-Lab/qgroundcontrol.git + cd qgroundcontrol + git submodule update --recursive + ``` + +- Install QT (https://www.qt.io/download-qt-installer-oss) + - Under Qt -> Qt 6.8.3 select: + Windows: MSVC 2022 - where is the architecture of your machine + Select all Additional Libraries + Deselect QT Design Studio + +- Install Additional Packages with `qgroundcontrol/tools/setup/install-depedencies-windows.ps1` + +- Install Visual Studio (for the libraries) + - https://visualstudio.microsoft.com/downloads/ + - Select `Desktop Development for C++` + +- Launch QT Creator and open `CMakeLists.txt` + - Takes long time to finish configuring + - On project settings, Add `Release` along side with `Debug` + +- Build with QT Creator and do run test + +- On Terminal on QT Creator, run below to make windows installer + ``` + cd qgroundcontrol\build\Desktop_Qt_6_8_3_MSVC2022_64bit-Release + "C:\Qt\Tools\CMake_64\bin\cmake.exe" --install . --config Release + ``` diff --git a/custom/android/AndroidManifest.xml b/custom/android/AndroidManifest.xml new file mode 100644 index 000000000000..9130406b01b7 --- /dev/null +++ b/custom/android/AndroidManifest.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/custom/android/res/drawable-hdpi/icon.png b/custom/android/res/drawable-hdpi/icon.png new file mode 100644 index 000000000000..8599371c9baa Binary files /dev/null and b/custom/android/res/drawable-hdpi/icon.png differ diff --git a/custom/android/res/drawable-ldpi/icon.png b/custom/android/res/drawable-ldpi/icon.png new file mode 100644 index 000000000000..8599371c9baa Binary files /dev/null and b/custom/android/res/drawable-ldpi/icon.png differ diff --git a/custom/android/res/drawable-mdpi/icon.png b/custom/android/res/drawable-mdpi/icon.png new file mode 100644 index 000000000000..8599371c9baa Binary files /dev/null and b/custom/android/res/drawable-mdpi/icon.png differ diff --git a/custom/android/res/drawable-xhdpi/icon.png b/custom/android/res/drawable-xhdpi/icon.png new file mode 100644 index 000000000000..cc01b4283f8c Binary files /dev/null and b/custom/android/res/drawable-xhdpi/icon.png differ diff --git a/custom/android/res/drawable-xxhdpi/icon.png b/custom/android/res/drawable-xxhdpi/icon.png new file mode 100644 index 000000000000..cc01b4283f8c Binary files /dev/null and b/custom/android/res/drawable-xxhdpi/icon.png differ diff --git a/custom/android/res/drawable-xxxhdpi/icon.png b/custom/android/res/drawable-xxxhdpi/icon.png new file mode 100644 index 000000000000..cc01b4283f8c Binary files /dev/null and b/custom/android/res/drawable-xxxhdpi/icon.png differ diff --git a/custom/cmake/CustomOverrides.cmake b/custom/cmake/CustomOverrides.cmake new file mode 100644 index 000000000000..12a86db29638 --- /dev/null +++ b/custom/cmake/CustomOverrides.cmake @@ -0,0 +1,24 @@ +set(QGC_APP_NAME "QGroundControl-MUTEC" CACHE STRING "App Name" FORCE) +set(QGC_APP_COPYRIGHT "Copyright (c) 2026 MUTEC KMOU (powered by IOES Lab.). All rights reserved." CACHE STRING "Copyright" FORCE) +set(QGC_APP_DESCRIPTION "Open Source Ground Control App Modified and powered by IOES Lab. KMOU" CACHE STRING "Description" FORCE) +set(QGC_ORG_NAME "MUTEC-KMOU" CACHE STRING "Org Name" FORCE) +set(QGC_ORG_DOMAIN "www.kmou.ac.kr/mutec" CACHE STRING "Domain" FORCE) + +set(QGC_MACOS_ICON_PATH "${CMAKE_SOURCE_DIR}/custom/res" CACHE PATH "MacOS Icon Path" FORCE) +set(QGC_APPIMAGE_ICON_PATH "${CMAKE_SOURCE_DIR}/custom/res/icons/custom_qgroundcontrol.png" CACHE FILEPATH "AppImage Icon Path" FORCE) + +if(EXISTS ${CMAKE_SOURCE_DIR}/custom/deploy/windows/installheader.bmp) + set(QGC_WINDOWS_INSTALL_HEADER_PATH "${CMAKE_SOURCE_DIR}/custom/deploy/windows/installheader.bmp" CACHE FILEPATH "Windows Install Header Path" FORCE) +endif() + +if(EXISTS ${CMAKE_SOURCE_DIR}/custom/deploy/windows/WindowsQGC.ico) + set(QGC_WINDOWS_ICON_PATH "${CMAKE_SOURCE_DIR}/custom/deploy/windows/WindowsQGC.ico" CACHE FILEPATH "Windows Icon Path" FORCE) +endif() + +# Build a single flight stack by disabling APM support +set(QGC_DISABLE_APM_MAVLINK ON CACHE BOOL "Disable APM Dialect" FORCE) +set(QGC_DISABLE_APM_PLUGIN ON CACHE BOOL "Disable APM Plugin" FORCE) +set(QGC_DISABLE_APM_PLUGIN_FACTORY ON CACHE BOOL "Disable APM Plugin Factory" FORCE) + +# We implement our own PX4 plugin factory +set(QGC_DISABLE_PX4_PLUGIN_FACTORY ON CACHE BOOL "Disable PX4 Plugin Factory" FORCE) diff --git a/custom/custom.qrc b/custom/custom.qrc new file mode 100644 index 000000000000..b8d0396c91e4 --- /dev/null +++ b/custom/custom.qrc @@ -0,0 +1,25 @@ + + + res/Images/altitude.svg + res/Images/attitude_crosshair.svg + res/Images/attitude_dial.svg + res/Images/attitude_pointer.svg + res/Images/chronometer.svg + res/Images/compass_needle.svg + res/Images/compass_pointer.svg + res/Images/distance.svg + res/Images/horizontal_speed.svg + res/Images/microSD.svg + res/Images/odometer.svg + res/Images/vertical_speed.svg + res/Images/dronecode-black.svg + res/Images/dronecode-white.svg + + + src/FlyViewCustomLayer.qml + + + res/QGCLogoFull.svg + res/icons/custom_qgroundcontrol.ico + + diff --git a/custom/deploy/windows/WindowsQGC.ico b/custom/deploy/windows/WindowsQGC.ico new file mode 100644 index 000000000000..683c8e78e3a7 Binary files /dev/null and b/custom/deploy/windows/WindowsQGC.ico differ diff --git a/custom/deploy/windows/installheader.bmp b/custom/deploy/windows/installheader.bmp new file mode 100644 index 000000000000..dc762510668e Binary files /dev/null and b/custom/deploy/windows/installheader.bmp differ diff --git a/custom/res/Custom/Widgets/CustomArtificialHorizon.qml b/custom/res/Custom/Widgets/CustomArtificialHorizon.qml new file mode 100644 index 000000000000..f11b582e3b1d --- /dev/null +++ b/custom/res/Custom/Widgets/CustomArtificialHorizon.qml @@ -0,0 +1,68 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick + +Item { + id: root + property real rollAngle : 0 + property real pitchAngle: 0 + property color skyColor1: Qt.hsla(0.6, 1.0, 0.25) + property color skyColor2: Qt.hsla(0.6, 0.5, 0.55) + property color groundColor1: Qt.hsla(0.25, 0.5, 0.45) + property color groundColor2: Qt.hsla(0.25, 0.75, 0.25) + + clip: true + anchors.fill: parent + + property real angularScale: pitchAngle * root.height / 45 + + Item { + id: artificialHorizon + width: root.width * 4 + height: root.height * 8 + anchors.centerIn: parent + Rectangle { + id: sky + anchors.fill: parent + smooth: true + antialiasing: true + gradient: Gradient { + GradientStop { position: 0.25; color: root.skyColor1 } + GradientStop { position: 0.5; color: root.skyColor2 } + } + } + Rectangle { + id: ground + height: sky.height / 2 + anchors { + left: sky.left; + right: sky.right; + bottom: sky.bottom + } + smooth: true + antialiasing: true + gradient: Gradient { + GradientStop { position: 0.0; color: root.groundColor1 } + GradientStop { position: 0.25; color: root.groundColor2 } + } + } + transform: [ + Translate { + y: angularScale + }, + Rotation { + origin.x: artificialHorizon.width / 2 + origin.y: artificialHorizon.height / 2 + angle: -rollAngle + }] + } +} diff --git a/custom/res/Custom/Widgets/CustomAttitudeWidget.qml b/custom/res/Custom/Widgets/CustomAttitudeWidget.qml new file mode 100644 index 000000000000..5df1920c6b4c --- /dev/null +++ b/custom/res/Custom/Widgets/CustomAttitudeWidget.qml @@ -0,0 +1,137 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick + +import QGroundControl +import QGroundControl.Controls +import QGroundControl.ScreenTools +import QGroundControl.Palette +import QGroundControl.FlightMap +import Qt5Compat.GraphicalEffects +Item { + id: root + + property bool showPitch: true + property var vehicle: null + property real size + property bool showHeading: false + + property real _rollAngle: vehicle ? vehicle.roll.rawValue : 0 + property real _pitchAngle: vehicle ? vehicle.pitch.rawValue : 0 + + width: size + height: size + + Item { + id: instrument + anchors.fill: parent + visible: false + + //---------------------------------------------------- + //-- Artificial Horizon + CustomArtificialHorizon { + rollAngle: _rollAngle + pitchAngle: _pitchAngle + skyColor1: "#0a2e50" + skyColor2: "#2f85d4" + groundColor1: "#897459" + groundColor2: "#4b3820" + anchors.fill: parent + } + //---------------------------------------------------- + //-- Instrument Dial + Image { + id: instrumentDial + source: "/custom/img/attitude_dial.svg" + mipmap: true + fillMode: Image.PreserveAspectFit + anchors.fill: parent + sourceSize.height: parent.height + transform: Rotation { + origin.x: root.width / 2 + origin.y: root.height / 2 + angle: -_rollAngle + } + } + //---------------------------------------------------- + //-- Pointer + Image { + id: pointer + height: size * 0.0625 + width: height + source: "/custom/img/attitude_pointer.svg" + antialiasing: true + fillMode: Image.PreserveAspectFit + sourceSize.height: height + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + } + //---------------------------------------------------- + //-- Pitch + QGCPitchIndicator { + id: pitchWidget + visible: root.showPitch + size: root.size * 0.5 + anchors.verticalCenter: parent.verticalCenter + pitchAngle: _pitchAngle + rollAngle: _rollAngle + color: Qt.rgba(0,0,0,0) + } + //---------------------------------------------------- + //-- Cross Hair + Image { + id: crossHair + anchors.centerIn: parent + source: "/custom/img/attitude_crosshair.svg" + mipmap: true + width: size * 0.75 + sourceSize.width: width + fillMode: Image.PreserveAspectFit + } + } + + Rectangle { + id: mask + anchors.fill: instrument + radius: width / 2 + color: "black" + visible: false + } + + OpacityMask { + anchors.fill: instrument + source: instrument + maskSource: mask + } + + Rectangle { + id: borderRect + anchors.fill: parent + radius: width / 2 + color: Qt.rgba(0,0,0,0) + border.color: "#000" + border.width: 1 + } + + QGCLabel { + anchors.bottomMargin: Math.round(ScreenTools.defaultFontPixelHeight * 0.5) + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + text: _headingString3 + color: "white" + visible: showHeading + font.pointSize: ScreenTools.smallFontPointSize + property string _headingString: vehicle ? vehicle.heading.rawValue.toFixed(0) : "OFF" + property string _headingString2: _headingString.length === 1 ? "0" + _headingString : _headingString + property string _headingString3: _headingString2.length === 2 ? "0" + _headingString2 : _headingString2 + } +} diff --git a/custom/res/Custom/Widgets/CustomIconButton.qml b/custom/res/Custom/Widgets/CustomIconButton.qml new file mode 100644 index 000000000000..bf3522da922b --- /dev/null +++ b/custom/res/Custom/Widgets/CustomIconButton.qml @@ -0,0 +1,62 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls + +import QGroundControl +import QGroundControl.Controls +import QGroundControl.Palette +import QGroundControl.ScreenTools + +Button { + id: _rootButton + width: parent.height * 1.25 + height: parent.height + flat: true + contentItem: Item { + id: _content + anchors.fill: _rootButton + Row { + id: _edge + spacing: ScreenTools.defaultFontPixelWidth * 0.25 + anchors.left: parent.left + anchors.leftMargin: ScreenTools.defaultFontPixelWidth + anchors.verticalCenter: parent.verticalCenter + Repeater { + model: [1,2,3] + Rectangle { + height: ScreenTools.defaultFontPixelHeight + width: ScreenTools.defaultFontPixelWidth * 0.25 + color: qgcPal.text + opacity: 0.75 + } + } + } + Image { + id: _icon + height: _rootButton.height * 0.75 + width: height + smooth: true + mipmap: true + antialiasing: true + fillMode: Image.PreserveAspectFit + source: qgcPal.globalTheme === QGCPalette.Light ? "/res/QGCLogoBlack.svg" : "/res/QGCLogoWhite.svg" + sourceSize.height: height + anchors.left: _edge.right + anchors.leftMargin: ScreenTools.defaultFontPixelWidth + anchors.verticalCenter: parent.verticalCenter + } + } + background: Item { + anchors.fill: parent + } +} diff --git a/custom/res/Custom/Widgets/CustomOnOffSwitch.qml b/custom/res/Custom/Widgets/CustomOnOffSwitch.qml new file mode 100644 index 000000000000..8d3318b154de --- /dev/null +++ b/custom/res/Custom/Widgets/CustomOnOffSwitch.qml @@ -0,0 +1,67 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick + +import QGroundControl.Palette +import QGroundControl.ScreenTools +import QGroundControl.Controls + +Rectangle { + id: _root + height: Math.round(ScreenTools.defaultFontPixelHeight * 2) + width: ScreenTools.defaultFontPixelWidth * 10 + color: qgcPal.button + border.color: qgcPal.windowShade + border.width: 0 + + property bool checked: true + + signal clicked + + QGCPalette { id: qgcPal; colorGroupEnabled: true } + + Rectangle { + width: parent.width * 0.5 + height: parent.height + color: checked ? qgcPal.button : qgcPal.buttonHighlight + border.color: qgcPal.text + border.width: 0 + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + QGCLabel { + text: qsTr("Off") + anchors.centerIn: parent + color: qgcPal.text + } + } + Rectangle { + width: parent.width * 0.5 + height: parent.height + color: checked ? qgcPal.buttonHighlight : qgcPal.button + border.color: qgcPal.text + border.width: 0 + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter + QGCLabel { + text: qsTr("On") + color: qgcPal.buttonHighlightText + anchors.centerIn: parent + } + } + MouseArea { + anchors.fill: parent + onClicked: { + checked = !checked + _root.clicked() + } + } +} diff --git a/custom/res/Custom/Widgets/CustomQuickButton.qml b/custom/res/Custom/Widgets/CustomQuickButton.qml new file mode 100644 index 000000000000..59fa3e9f8366 --- /dev/null +++ b/custom/res/Custom/Widgets/CustomQuickButton.qml @@ -0,0 +1,56 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls + +import QGroundControl +import QGroundControl.Controls +import QGroundControl.Palette +import QGroundControl.ScreenTools + +Button { + id: control + autoExclusive: true + checkable: true + + property string iconSource: "" + property real iconRatio: 0.5 + property real buttonRadius: ScreenTools.defaultFontPixelWidth * 0.5 + + background: Rectangle { + width: control.width + height: width + anchors.centerIn: parent + color: (mouseArea.pressed || control.checked) ? qgcPal.buttonHighlight : (qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(1,1,1,0.5) : Qt.rgba(0,0,0,0.5)) + radius: control.buttonRadius + } + contentItem: Item { + anchors.fill: control + QGCColoredImage { + source: iconSource + color: (mouseArea.pressed || control.checked) ? qgcPal.buttonHighlightText : qgcPal.buttonText + width: control.width * iconRatio + height: width + anchors.centerIn: parent + sourceSize.height: height + } + } + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: { + if(checkable) + checked = true + control.clicked() + } + } +} diff --git a/custom/res/Custom/Widgets/CustomSignalStrength.qml b/custom/res/Custom/Widgets/CustomSignalStrength.qml new file mode 100644 index 000000000000..61b12460705b --- /dev/null +++ b/custom/res/Custom/Widgets/CustomSignalStrength.qml @@ -0,0 +1,48 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls + +import QGroundControl +import QGroundControl.Controls +import QGroundControl.ScreenTools +import QGroundControl.Palette + +Item { + width: size + height: size + + property real size: 50 + property real percent: 0 + + QGCPalette { id: qgcPal } + + function getIcon() { + if (percent < 20) + return "/custom/img/menu_signal_0.svg" + if (percent < 40) + return "/custom/img/menu_signal_25.svg" + if (percent < 60) + return "/custom/img/menu_signal_50.svg" + if (percent < 90) + return "/custom/img/menu_signal_75.svg" + return "/custom/img/menu_signal_100.svg" + } + + QGCColoredImage { + source: getIcon() + fillMode: Image.PreserveAspectFit + anchors.fill: parent + sourceSize.height: size + color: qgcPal.text + } +} diff --git a/custom/res/Custom/Widgets/CustomToolBarButton.qml b/custom/res/Custom/Widgets/CustomToolBarButton.qml new file mode 100644 index 000000000000..bd475aff499a --- /dev/null +++ b/custom/res/Custom/Widgets/CustomToolBarButton.qml @@ -0,0 +1,62 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls + +import QGroundControl.Controls +import QGroundControl.Palette +import QGroundControl.ScreenTools + +Button { + id: button + autoExclusive: true + + background: Rectangle { + anchors.fill: parent + color: qgcPal.buttonHighlight + visible: (mouseArea.pressed || button.checked) + } + + contentItem: Row { + spacing: ScreenTools.defaultFontPixelWidth + anchors.left: button.left + anchors.leftMargin: ScreenTools.defaultFontPixelWidth + anchors.verticalCenter: button.verticalCenter + Item { + height: ScreenTools.defaultFontPixelHeight * 3 + width: 1 + } + QGCColoredImage { + id: _icon + height: ScreenTools.defaultFontPixelHeight + width: height + sourceSize.height: parent.height + fillMode: Image.PreserveAspectFit + color: qgcPal.buttonText + source: button.icon.source + anchors.verticalCenter: parent.verticalCenter + } + Label { + id: _label + visible: text !== "" + text: button.text + color: qgcPal.buttonText + anchors.verticalCenter: parent.verticalCenter + } + } + // Process hover events + MouseArea { + id: mouseArea + anchors.fill: parent + onClicked: button.clicked() + } +} diff --git a/custom/res/Custom/Widgets/CustomVehicleButton.qml b/custom/res/Custom/Widgets/CustomVehicleButton.qml new file mode 100644 index 000000000000..472ebffbe991 --- /dev/null +++ b/custom/res/Custom/Widgets/CustomVehicleButton.qml @@ -0,0 +1,98 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls + +import QGroundControl.Controls +import QGroundControl.Palette +import QGroundControl.ScreenTools + +Button { + id: button + height: _infoCol.height * 1.25 + autoExclusive: true + + property var vehicle: null + + function getBatteryColor() { + if(vehicle) { + if(vehicle.battery.percentRemaining.value > 75) { + return qgcPal.colorGreen + } + if(vehicle.battery.percentRemaining.value > 50) { + return qgcPal.colorOrange + } + if(vehicle.battery.percentRemaining.value > 0.1) { + return qgcPal.colorRed + } + } + return qgcPal.colorGrey + } + + function getBatteryPercentage() { + if(vehicle) { + return vehicle.battery.percentRemaining.value / 100.0 + } + return 1 + } + + background: Rectangle { + anchors.fill: parent + color: button.checked ? qgcPal.buttonHighlight : qgcPal.button + radius: ScreenTools.defaultFontPixelWidth * 0.5 + } + + contentItem: Row { + spacing: ScreenTools.defaultFontPixelWidth + anchors.margins: ScreenTools.defaultFontPixelWidth + anchors.verticalCenter: button.verticalCenter +// QGCColoredImage { +// id: _icon +// height: ScreenTools.defaultFontPixelHeight * 1.5 +// width: height +// sourceSize.height: parent.height +// fillMode: Image.PreserveAspectFit +// color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText +// source: "/qmlimages/PaperPlane.svg" +// anchors.verticalCenter: parent.verticalCenter +// } + Column { + id: _infoCol + spacing: ScreenTools.defaultFontPixelHeight * 0.25 + QGCLabel { + text: qsTr("Vehicle ") + (vehicle ? vehicle.id : qsTr("None")) + font.bold: true + color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText + } + Row { + spacing: ScreenTools.defaultFontPixelWidth + QGCLabel { + text: vehicle ? vehicle.flightMode : qsTr("None") + color: button.checked ? qgcPal.buttonHighlightText : qgcPal.buttonText + } + Rectangle { + height: ScreenTools.defaultFontPixelHeight * 0.5 + width: ScreenTools.defaultFontPixelWidth * 3 + color: Qt.rgba(0,0,0,0) + anchors.verticalCenter: parent.verticalCenter + Rectangle { + height: parent.height + width: parent.width * getBatteryPercentage() + color: getBatteryColor() + anchors.right: parent.right + } + } + } + } + } + +} diff --git a/custom/res/Images/CustomVehicleIcon.svg b/custom/res/Images/CustomVehicleIcon.svg new file mode 100644 index 000000000000..b2adb14e3b09 --- /dev/null +++ b/custom/res/Images/CustomVehicleIcon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/custom/res/Images/altitude.svg b/custom/res/Images/altitude.svg new file mode 100644 index 000000000000..7245538f5a3f --- /dev/null +++ b/custom/res/Images/altitude.svg @@ -0,0 +1,3 @@ + + + diff --git a/custom/res/Images/attitude_crosshair.svg b/custom/res/Images/attitude_crosshair.svg new file mode 100644 index 000000000000..32f2e7df4b95 --- /dev/null +++ b/custom/res/Images/attitude_crosshair.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/custom/res/Images/attitude_dial.svg b/custom/res/Images/attitude_dial.svg new file mode 100644 index 000000000000..ce7988b7ea4e --- /dev/null +++ b/custom/res/Images/attitude_dial.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/custom/res/Images/attitude_pointer.svg b/custom/res/Images/attitude_pointer.svg new file mode 100644 index 000000000000..1ac74e4b906a --- /dev/null +++ b/custom/res/Images/attitude_pointer.svg @@ -0,0 +1,3 @@ + + + diff --git a/custom/res/Images/chronometer.svg b/custom/res/Images/chronometer.svg new file mode 100644 index 000000000000..3b1dcb7b41e8 --- /dev/null +++ b/custom/res/Images/chronometer.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/custom/res/Images/compass_needle.svg b/custom/res/Images/compass_needle.svg new file mode 100644 index 000000000000..bd3c1b9f92c2 --- /dev/null +++ b/custom/res/Images/compass_needle.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/custom/res/Images/compass_pointer.svg b/custom/res/Images/compass_pointer.svg new file mode 100644 index 000000000000..3a4aa5a62dca --- /dev/null +++ b/custom/res/Images/compass_pointer.svg @@ -0,0 +1,3 @@ + + + diff --git a/custom/res/Images/distance.svg b/custom/res/Images/distance.svg new file mode 100644 index 000000000000..fd735a1b4106 --- /dev/null +++ b/custom/res/Images/distance.svg @@ -0,0 +1,4 @@ + + + + diff --git a/custom/res/Images/dronecode-black.svg b/custom/res/Images/dronecode-black.svg new file mode 100644 index 000000000000..0de6168334dc --- /dev/null +++ b/custom/res/Images/dronecode-black.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/custom/res/Images/dronecode-white.svg b/custom/res/Images/dronecode-white.svg new file mode 100644 index 000000000000..1be666ccc565 --- /dev/null +++ b/custom/res/Images/dronecode-white.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/custom/res/Images/horizontal_speed.svg b/custom/res/Images/horizontal_speed.svg new file mode 100644 index 000000000000..e30be4ee5dbf --- /dev/null +++ b/custom/res/Images/horizontal_speed.svg @@ -0,0 +1,4 @@ + + + + diff --git a/custom/res/Images/microSD.svg b/custom/res/Images/microSD.svg new file mode 100644 index 000000000000..894a8507d641 --- /dev/null +++ b/custom/res/Images/microSD.svg @@ -0,0 +1,3 @@ + + + diff --git a/custom/res/Images/mutec-logo-square.jpg b/custom/res/Images/mutec-logo-square.jpg new file mode 100644 index 000000000000..0b646bfb4fec Binary files /dev/null and b/custom/res/Images/mutec-logo-square.jpg differ diff --git a/custom/res/Images/mutec-logo-svg-interp.svg b/custom/res/Images/mutec-logo-svg-interp.svg new file mode 100644 index 000000000000..a4072c5f2d65 --- /dev/null +++ b/custom/res/Images/mutec-logo-svg-interp.svg @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/custom/res/Images/mutec-logo-wide-eng.jpg b/custom/res/Images/mutec-logo-wide-eng.jpg new file mode 100644 index 000000000000..ec3db51bf267 Binary files /dev/null and b/custom/res/Images/mutec-logo-wide-eng.jpg differ diff --git a/custom/res/Images/mutec-logo-wide.jpg b/custom/res/Images/mutec-logo-wide.jpg new file mode 100644 index 000000000000..04c615a2b3fc Binary files /dev/null and b/custom/res/Images/mutec-logo-wide.jpg differ diff --git a/custom/res/Images/mutec-logo.png b/custom/res/Images/mutec-logo.png new file mode 100644 index 000000000000..8d82113e548b Binary files /dev/null and b/custom/res/Images/mutec-logo.png differ diff --git a/custom/res/Images/odometer.svg b/custom/res/Images/odometer.svg new file mode 100644 index 000000000000..1a8c52b35c05 --- /dev/null +++ b/custom/res/Images/odometer.svg @@ -0,0 +1,10 @@ + + + + + + + 1 + diff --git a/custom/res/Images/vertical_speed.svg b/custom/res/Images/vertical_speed.svg new file mode 100644 index 000000000000..a76ceb836bd5 --- /dev/null +++ b/custom/res/Images/vertical_speed.svg @@ -0,0 +1,4 @@ + + + + diff --git a/custom/res/Images/void.png b/custom/res/Images/void.png new file mode 100644 index 000000000000..1e9811e8ce6a Binary files /dev/null and b/custom/res/Images/void.png differ diff --git a/custom/res/QGCLogoFull.svg b/custom/res/QGCLogoFull.svg new file mode 100644 index 000000000000..3701fa20ef5f --- /dev/null +++ b/custom/res/QGCLogoFull.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + MUTEC + diff --git a/custom/res/icons/custom_qgroundcontrol.ico b/custom/res/icons/custom_qgroundcontrol.ico new file mode 100644 index 000000000000..683c8e78e3a7 Binary files /dev/null and b/custom/res/icons/custom_qgroundcontrol.ico differ diff --git a/custom/res/icons/custom_qgroundcontrol.png b/custom/res/icons/custom_qgroundcontrol.png new file mode 100644 index 000000000000..e7408b65c4d4 Binary files /dev/null and b/custom/res/icons/custom_qgroundcontrol.png differ diff --git a/custom/res/macx.icns b/custom/res/macx.icns new file mode 100644 index 000000000000..d44e2d610140 Binary files /dev/null and b/custom/res/macx.icns differ diff --git a/custom/src/CustomGuidedActionsController.qml b/custom/src/CustomGuidedActionsController.qml new file mode 100644 index 000000000000..fb5a61f8d486 --- /dev/null +++ b/custom/src/CustomGuidedActionsController.qml @@ -0,0 +1,46 @@ +/**************************************************************************** + * + * (c) 2009-2020 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + ****************************************************************************/ + +// Custom builds can override this file to add custom guided actions. + +import QtQml + +QtObject { + readonly property int actionCustomButton: _guidedController.customActionStart + 0 + + readonly property string customButtonTitle: qsTr("Custom") + + readonly property string customButtonMessage: qsTr("Example of a custom action.") + + function customConfirmAction(actionCode, actionData, mapIndicator, confirmDialog) { + switch (actionCode) { + case actionCustomButton: + confirmDialog.hideTrigger = true + confirmDialog.title = customButtonTitle + confirmDialog.message = customButtonMessage + break + default: + return false // false = action not handled here + } + + return true // true = action handled here + } + + function customExecuteAction(actionCode, actionData, sliderOutputValue, optionCheckedode) { + switch (actionCode) { + case actionCustomButton: + mainWindow.showMessageDialog("Custom Action", "Custom action executed.") + break + default: + return false // false = action not handled here + } + + return true // true = action handled here + } +} \ No newline at end of file diff --git a/custom/src/FlyViewCustomLayer.qml b/custom/src/FlyViewCustomLayer.qml new file mode 100644 index 000000000000..3e04c35dad96 --- /dev/null +++ b/custom/src/FlyViewCustomLayer.qml @@ -0,0 +1,258 @@ +/**************************************************************************** + * + * (c) 2009-2019 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + * @file + * @author Gus Grubba + */ + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts + +import QGroundControl +import QGroundControl.Controls +import QGroundControl.Palette +import QGroundControl.ScreenTools + +import Custom.Widgets + +Item { + property var parentToolInsets // These insets tell you what screen real estate is available for positioning the controls in your overlay + property var totalToolInsets: _totalToolInsets // The insets updated for the custom overlay additions + property var mapControl + + readonly property string noGPS: qsTr("NO GPS") + readonly property real indicatorValueWidth: ScreenTools.defaultFontPixelWidth * 7 + + property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle + property real _indicatorDiameter: ScreenTools.defaultFontPixelWidth * 18 + property real _indicatorsHeight: ScreenTools.defaultFontPixelHeight + property var _sepColor: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.5) : Qt.rgba(1,1,1,0.5) + property color _indicatorsColor: qgcPal.text + property bool _isVehicleGps: _activeVehicle ? _activeVehicle.gps.count.rawValue > 1 && _activeVehicle.gps.hdop.rawValue < 1.4 : false + property string _altitude: _activeVehicle ? (isNaN(_activeVehicle.altitudeRelative.value) ? "0.0" : _activeVehicle.altitudeRelative.value.toFixed(1)) + ' ' + _activeVehicle.altitudeRelative.units : "0.0" + property string _distanceStr: isNaN(_distance) ? "0" : _distance.toFixed(0) + ' ' + QGroundControl.unitsConversion.appSettingsHorizontalDistanceUnitsString + property real _heading: _activeVehicle ? _activeVehicle.heading.rawValue : 0 + property real _distance: _activeVehicle ? _activeVehicle.distanceToHome.rawValue : 0 + property string _messageTitle: "" + property string _messageText: "" + property real _toolsMargin: ScreenTools.defaultFontPixelWidth * 0.75 + + function secondsToHHMMSS(timeS) { + var sec_num = parseInt(timeS, 10); + var hours = Math.floor(sec_num / 3600); + var minutes = Math.floor((sec_num - (hours * 3600)) / 60); + var seconds = sec_num - (hours * 3600) - (minutes * 60); + if (hours < 10) {hours = "0"+hours;} + if (minutes < 10) {minutes = "0"+minutes;} + if (seconds < 10) {seconds = "0"+seconds;} + return hours+':'+minutes+':'+seconds; + } + + QGCToolInsets { + id: _totalToolInsets + leftEdgeTopInset: parentToolInsets.leftEdgeTopInset + leftEdgeCenterInset: exampleRectangle.leftEdgeCenterInset + leftEdgeBottomInset: parentToolInsets.leftEdgeBottomInset + rightEdgeTopInset: parentToolInsets.rightEdgeTopInset + rightEdgeCenterInset: parentToolInsets.rightEdgeCenterInset + rightEdgeBottomInset: parent.width - compassBackground.x + topEdgeLeftInset: parentToolInsets.topEdgeLeftInset + topEdgeCenterInset: compassArrowIndicator.y + compassArrowIndicator.height + topEdgeRightInset: parentToolInsets.topEdgeRightInset + bottomEdgeLeftInset: parentToolInsets.bottomEdgeLeftInset + bottomEdgeCenterInset: parentToolInsets.bottomEdgeCenterInset + bottomEdgeRightInset: parent.height - attitudeIndicator.y + } + + // This is an example of how you can use parent tool insets to position an element on the custom fly view layer + // - we use parent topEdgeLeftInset to position the widget below the toolstrip + // - we use parent bottomEdgeLeftInset to dodge the virtual joystick if enabled + // - we use the parent leftEdgeTopInset to size our element to the same width as the ToolStripAction + // - we export the width of this element as the leftEdgeCenterInset so that the map will recenter if the vehicle flys behind this element + Rectangle { + id: exampleRectangle + visible: false // to see this example, set this to true. To view insets, enable the insets viewer FlyView.qml + anchors.left: parent.left + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.topMargin: parentToolInsets.topEdgeLeftInset + _toolsMargin + anchors.bottomMargin: parentToolInsets.bottomEdgeLeftInset + _toolsMargin + anchors.leftMargin: _toolsMargin + width: parentToolInsets.leftEdgeTopInset - _toolsMargin + color: 'red' + + property real leftEdgeCenterInset: visible ? x + width : 0 + } + + //------------------------------------------------------------------------- + //-- Heading Indicator + Rectangle { + id: compassBar + height: ScreenTools.defaultFontPixelHeight * 1.5 + width: ScreenTools.defaultFontPixelWidth * 50 + anchors.bottom: parent.bottom + anchors.bottomMargin: _toolsMargin + color: "#DEDEDE" + radius: 2 + clip: true + anchors.horizontalCenter: parent.horizontalCenter + Repeater { + model: 720 + QGCLabel { + function _normalize(degrees) { + var a = degrees % 360 + if (a < 0) a += 360 + return a + } + property int _startAngle: modelData + 180 + _heading + property int _angle: _normalize(_startAngle) + anchors.verticalCenter: parent.verticalCenter + x: visible ? ((modelData * (compassBar.width / 360)) - (width * 0.5)) : 0 + visible: _angle % 45 == 0 + color: "#75505565" + font.pointSize: ScreenTools.smallFontPointSize + text: { + switch(_angle) { + case 0: return "N" + case 45: return "NE" + case 90: return "E" + case 135: return "SE" + case 180: return "S" + case 225: return "SW" + case 270: return "W" + case 315: return "NW" + } + return "" + } + } + } + } + Rectangle { + id: headingIndicator + height: ScreenTools.defaultFontPixelHeight + width: ScreenTools.defaultFontPixelWidth * 4 + color: qgcPal.windowShadeDark + anchors.top: compassBar.top + anchors.topMargin: -headingIndicator.height / 2 + anchors.horizontalCenter: parent.horizontalCenter + QGCLabel { + text: _heading + color: qgcPal.text + font.pointSize: ScreenTools.smallFontPointSize + anchors.centerIn: parent + } + } + Image { + id: compassArrowIndicator + height: _indicatorsHeight + width: height + source: "/custom/img/compass_pointer.svg" + fillMode: Image.PreserveAspectFit + sourceSize.height: height + anchors.top: compassBar.bottom + anchors.topMargin: -height / 2 + anchors.horizontalCenter: parent.horizontalCenter + } + + Rectangle { + id: compassBackground + anchors.bottom: attitudeIndicator.bottom + anchors.right: attitudeIndicator.left + anchors.rightMargin: -attitudeIndicator.width / 2 + width: -anchors.rightMargin + compassBezel.width + (_toolsMargin * 2) + height: attitudeIndicator.height * 0.75 + radius: 2 + color: qgcPal.window + + Rectangle { + id: compassBezel + anchors.verticalCenter: parent.verticalCenter + anchors.leftMargin: _toolsMargin + anchors.left: parent.left + width: height + height: parent.height - (northLabelBackground.height / 2) - (headingLabelBackground.height / 2) + radius: height / 2 + border.color: qgcPal.text + border.width: 1 + color: Qt.rgba(0,0,0,0) + } + + Rectangle { + id: northLabelBackground + anchors.top: compassBezel.top + anchors.topMargin: -height / 2 + anchors.horizontalCenter: compassBezel.horizontalCenter + width: northLabel.contentWidth * 1.5 + height: northLabel.contentHeight * 1.5 + radius: ScreenTools.defaultFontPixelWidth * 0.25 + color: qgcPal.windowShade + + QGCLabel { + id: northLabel + anchors.centerIn: parent + text: "N" + color: qgcPal.text + font.pointSize: ScreenTools.smallFontPointSize + } + } + + Image { + id: headingNeedle + anchors.centerIn: compassBezel + height: compassBezel.height * 0.75 + width: height + source: "/custom/img/compass_needle.svg" + fillMode: Image.PreserveAspectFit + sourceSize.height: height + transform: [ + Rotation { + origin.x: headingNeedle.width / 2 + origin.y: headingNeedle.height / 2 + angle: _heading + }] + } + + Rectangle { + id: headingLabelBackground + anchors.top: compassBezel.bottom + anchors.topMargin: -height / 2 + anchors.horizontalCenter: compassBezel.horizontalCenter + width: headingLabel.contentWidth * 1.5 + height: headingLabel.contentHeight * 1.5 + radius: ScreenTools.defaultFontPixelWidth * 0.25 + color: qgcPal.windowShade + + QGCLabel { + id: headingLabel + anchors.centerIn: parent + text: _heading + color: qgcPal.text + font.pointSize: ScreenTools.smallFontPointSize + } + } + } + + Rectangle { + id: attitudeIndicator + anchors.bottomMargin: _toolsMargin + parentToolInsets.bottomEdgeRightInset + anchors.rightMargin: _toolsMargin + anchors.bottom: parent.bottom + anchors.right: parent.right + height: ScreenTools.defaultFontPixelHeight * 6 + width: height + radius: height * 0.5 + color: qgcPal.windowShade + + CustomAttitudeWidget { + size: parent.height * 0.95 + vehicle: _activeVehicle + showHeading: false + anchors.centerIn: parent + } + } +} diff --git a/custom/src/FlyViewToolStripActionList.qml b/custom/src/FlyViewToolStripActionList.qml new file mode 100644 index 000000000000..d14e671c0724 --- /dev/null +++ b/custom/src/FlyViewToolStripActionList.qml @@ -0,0 +1,35 @@ +/**************************************************************************** + * + * (c) 2009-2020 QGROUNDCONTROL PROJECT + * + * QGroundControl is licensed according to the terms in the file + * COPYING.md in the root of the source code directory. + * + ****************************************************************************/ + +import QtQml.Models + +import QGroundControl +import QGroundControl.Controls + +ToolStripActionList { + id: _root + + signal displayPreFlightChecklist + + model: [ + PreFlightCheckListShowAction { onTriggered: displayPreFlightChecklist() }, + GuidedActionTakeoff { }, + GuidedActionLand { }, + GuidedActionRTL { }, + GuidedActionPause { }, + FlyViewAdditionalActionsButton { }, + GuidedToolStripAction { + text: _guidedController._customController.customButtonTitle + iconSource: "/res/gear-white.svg" + visible: true + enabled: true + actionID: _guidedController._customController.actionCustomButton +} + ] +} diff --git a/src/FirmwarePlugin/APM/APMBrandImage.png b/src/FirmwarePlugin/APM/APMBrandImage.png index 2a0692eca87f..a884bc0a2880 100644 Binary files a/src/FirmwarePlugin/APM/APMBrandImage.png and b/src/FirmwarePlugin/APM/APMBrandImage.png differ diff --git a/src/FirmwarePlugin/APM/APMBrandImageSub.png b/src/FirmwarePlugin/APM/APMBrandImageSub.png index 8f8a24f995c4..a884bc0a2880 100644 Binary files a/src/FirmwarePlugin/APM/APMBrandImageSub.png and b/src/FirmwarePlugin/APM/APMBrandImageSub.png differ diff --git a/src/FirmwarePlugin/APM/APMBrandImageSub_backup.png b/src/FirmwarePlugin/APM/APMBrandImageSub_backup.png new file mode 100644 index 000000000000..8f8a24f995c4 Binary files /dev/null and b/src/FirmwarePlugin/APM/APMBrandImageSub_backup.png differ diff --git a/src/FirmwarePlugin/APM/APMBrandImage_backup.png b/src/FirmwarePlugin/APM/APMBrandImage_backup.png new file mode 100644 index 000000000000..2a0692eca87f Binary files /dev/null and b/src/FirmwarePlugin/APM/APMBrandImage_backup.png differ diff --git a/src/GPS/CMakeLists.txt b/src/GPS/CMakeLists.txt index 4b75ad46c956..17b8e4b0ddde 100644 --- a/src/GPS/CMakeLists.txt +++ b/src/GPS/CMakeLists.txt @@ -28,7 +28,7 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_ CPMAddPackage( NAME px4-gpsdrivers GITHUB_REPOSITORY PX4/PX4-GPSDrivers - GIT_TAG main + GIT_TAG caf5158061bd10e79c9f042abb62c86bc6f3e7a7 SOURCE_SUBDIR src ) diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 4f4ef3de366d..9d368c001f73 100644 --- a/src/QmlControls/ScreenTools.qml +++ b/src/QmlControls/ScreenTools.qml @@ -30,17 +30,17 @@ Item { //-- The point and pixel font size values are computed at runtime - property real defaultFontPointSize: 10 - property real platformFontPointSize: 10 + property real defaultFontPointSize: 16 + property real platformFontPointSize: 16 - readonly property real smallFontPointRatio: 0.75 - readonly property real mediumFontPointRatio: 1.25 - readonly property real largeFontPointRatio: 1.5 + readonly property real smallFontPointRatio: 1.5 + readonly property real mediumFontPointRatio: 2.0 + readonly property real largeFontPointRatio: 2.5 /// You can use these properties to position ui elements in a screen resolution independent manner. Using fixed positioning values should not /// be done. All positioning should be done using anchors or a ratio of the defaultFontPixelHeight and defaultFontPixelWidth values. This way /// your ui elements will reposition themselves appropriately on varying screen sizes and resolutions. - property real defaultFontPixelHeight: 10 + property real defaultFontPixelHeight: 16 property real largeFontPixelHeight: defaultFontPixelHeight * largeFontPointRatio property real mediumFontPixelHeight: defaultFontPixelHeight * mediumFontPointRatio property real smallFontPixelHeight: defaultFontPixelHeight * smallFontPointRatio @@ -48,7 +48,7 @@ Item { /// You can use these properties to position ui elements in a screen resolution independent manner. Using fixed positioning values should not /// be done. All positioning should be done using anchors or a ratio of the defaultFontPixelHeight and defaultFontPixelWidth values. This way /// your ui elements will reposition themselves appropriately on varying screen sizes and resolutions. - property real defaultFontPixelWidth: 10 + property real defaultFontPixelWidth: 16 property real largeFontPixelWidth: defaultFontPixelWidth * largeFontPointRatio property real mediumFontPixelWidth: defaultFontPixelWidth * mediumFontPointRatio property real smallFontPixelWidth: defaultFontPixelWidth * smallFontPointRatio @@ -59,9 +59,9 @@ Item { /// The default amount of space in between controls in a dialog property real defaultDialogControlSpacing: defaultFontPixelHeight / 2 - property real smallFontPointSize: 10 - property real mediumFontPointSize: 10 - property real largeFontPointSize: 10 + property real smallFontPointSize: 16 + property real mediumFontPointSize: 20 + property real largeFontPointSize: 24 property real toolbarHeight: 0 @@ -199,7 +199,7 @@ Item { platformFontPointSize = 14; } } else { - platformFontPointSize = _defaultFont.font.pointSize; + platformFontPointSize = 16; } //-- See if we are using a custom size var _appFontPointSizeFact = QGroundControl.settingsManager.appSettings.appFontPointSize diff --git a/src/Settings/App.SettingsGroup.json b/src/Settings/App.SettingsGroup.json index 84984ad0df6a..96a794d7f37c 100644 --- a/src/Settings/App.SettingsGroup.json +++ b/src/Settings/App.SettingsGroup.json @@ -144,7 +144,7 @@ "longDesc": "The point size for the default font used.", "type": "uint32", "units": "pt", - "min": 6, + "min": 12, "max": 48, "default": 0 },