Skip to content

Commit 9546ecf

Browse files
authored
Merge branch 'master' into feature/gimbal-max-speed
2 parents 62f622d + 46c6d2e commit 9546ecf

File tree

436 files changed

+1544
-1393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

436 files changed

+1544
-1393
lines changed

.github/actions/qt-android/action.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
abis:
1515
description: ABIs to Build
1616
required: false
17-
default: 'armeabi-v7a;arm64-v8a'
17+
default: 'arm64-v8a;armeabi-v7a'
1818
cpm-modules:
1919
description: CPM Cache Path
2020
required: false
@@ -35,14 +35,14 @@ runs:
3535
uses: android-actions/setup-android@v3
3636
with:
3737
cmdline-tools-version: 12266719
38-
packages: 'platform-tools platforms;android-35 build-tools;35.0.0' # ndk;26.1.10909125'
38+
packages: 'platform-tools platforms;android-36 build-tools;36.0.0' # ndk;26.1.10909125,27.2.12479018'
3939
log-accepted-android-sdk-licenses: false
4040

4141
- name: Install Android NDK
4242
uses: nttld/setup-ndk@v1
4343
id: setup-ndk
4444
with:
45-
ndk-version: ${{ inputs.version == '6.8.3' && 'r26b' || 'r25b' }}
45+
ndk-version: r27c
4646
add-to-path: false
4747

4848
- run: |
@@ -76,53 +76,53 @@ runs:
7676
setup-python: false
7777
cache: true
7878

79-
- name: Install Qt for Android (armv7)
80-
if: contains( inputs.abis, 'armeabi-v7a')
79+
- name: Install Qt for Android (arm64_v8a)
80+
if: contains( inputs.abis, 'arm64-v8a')
8181
uses: jurplel/install-qt-action@v4
8282
with:
8383
version: ${{ inputs.version }}
8484
host: ${{ inputs.host }}
8585
target: android
86-
arch: android_armv7
86+
arch: android_arm64_v8a
8787
dir: ${{ runner.temp }}
8888
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
8989
setup-python: false
9090
cache: true
9191

92-
- name: Install Qt for Android (arm64_v8a)
93-
if: contains( inputs.abis, 'arm64-v8a')
92+
- name: Install Qt for Android (armv7)
93+
if: contains( inputs.abis, 'armeabi-v7a')
9494
uses: jurplel/install-qt-action@v4
9595
with:
9696
version: ${{ inputs.version }}
9797
host: ${{ inputs.host }}
9898
target: android
99-
arch: android_arm64_v8a
99+
arch: android_armv7
100100
dir: ${{ runner.temp }}
101101
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
102102
setup-python: false
103103
cache: true
104104

105-
- name: Install Qt for Android (x86)
106-
if: contains( inputs.abis, 'x86')
105+
- name: Install Qt for Android (x86_64)
106+
if: contains( inputs.abis, 'x86_64')
107107
uses: jurplel/install-qt-action@v4
108108
with:
109109
version: ${{ inputs.version }}
110110
host: ${{ inputs.host }}
111111
target: android
112-
arch: android_x86
112+
arch: android_x86_64
113113
dir: ${{ runner.temp }}
114114
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
115115
setup-python: false
116116
cache: true
117117

118-
- name: Install Qt for Android (x86_64)
119-
if: contains( inputs.abis, 'x86_64')
118+
- name: Install Qt for Android (x86)
119+
if: contains( inputs.abis, 'x86')
120120
uses: jurplel/install-qt-action@v4
121121
with:
122122
version: ${{ inputs.version }}
123123
host: ${{ inputs.host }}
124124
target: android
125-
arch: android_x86_64
125+
arch: android_x86
126126
dir: ${{ runner.temp }}
127127
modules: qtcharts qtlocation qtpositioning qtspeech qt5compat qtmultimedia qtserialport qtimageformats qtshadertools qtconnectivity qtquick3d qtsensors
128128
setup-python: false

.github/actions/upload/action.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ inputs:
1313
aws_secret_access_key:
1414
description: AWS secret access key
1515
required: false
16+
aws_distribution_id:
17+
description: AWS distribution ID
18+
required: false
1619
github_token:
1720
description: GitHub Token
1821
required: false
@@ -38,18 +41,42 @@ runs:
3841
aws-secret-access-key: ${{ inputs.aws_secret_access_key }}
3942
aws-region: us-west-2
4043

41-
- name: Upload stable build to S3 Bucket
44+
- name: Upload all push builds to S3 Bucket
4245
if: ${{ inputs.upload_aws && github.event_name == 'push' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' }}
4346
working-directory: ${{ runner.temp }}/build/${{ inputs.source }}
4447
run: aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }} --acl public-read
4548
shell: bash
4649

47-
- name: Upload tagged stable build to S3 latest Bucket
50+
- name: Invalidate daily/continuous push build CloudFront Cache
51+
if: ${{ inputs.upload_aws && github.event_name == 'push' && github.ref_name == 'master' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' && inputs.aws_distribution_id != '' }}
52+
run: |
53+
aws cloudfront create-invalidation \
54+
--distribution-id ${{ inputs.aws_distribution_id }} \
55+
--paths s3://qgroundcontrol/builds/${{ github.ref_name }}/${{ inputs.artifact_name }}
56+
shell: bash
57+
env:
58+
AWS_ACCESS_KEY_ID: ${{ inputs.aws_key_id }}
59+
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws_secret_access_key }}
60+
AWS_REGION: us-west-2
61+
62+
- name: Upload tagged stable push build to S3 latest Bucket
4863
if: ${{ inputs.upload_aws && github.event_name == 'push' && github.ref_type == 'tag' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' }}
4964
working-directory: ${{ runner.temp }}/build/${{ inputs.source }}
5065
run: aws s3 cp ${{ inputs.artifact_name }} s3://qgroundcontrol/latest/${{ inputs.artifact_name }} --acl public-read
5166
shell: bash
5267

68+
- name: Invalidate tagged stable push build CloudFront Cache
69+
if: ${{ inputs.upload_aws && github.event_name == 'push' && github.ref_type == 'tag' && !github.event.pull_request.head.repo.fork && inputs.aws_key_id != '' && inputs.aws_secret_access_key != '' && inputs.aws_distribution_id != '' }}
70+
run: |
71+
aws cloudfront create-invalidation \
72+
--distribution-id ${{ inputs.aws_distribution_id }} \
73+
--paths s3://qgroundcontrol/latest/${{ inputs.artifact_name }}
74+
shell: bash
75+
env:
76+
AWS_ACCESS_KEY_ID: ${{ inputs.aws_key_id }}
77+
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws_secret_access_key }}
78+
AWS_REGION: us-west-2
79+
5380
# Commented out since it is 100% fail in CI
5481
# - name: Create Continuous Release
5582
# if: ${{ github.event_name != 'pull_request' && github.ref_name == 'master' && inputs.github_token != '' }}

.github/workflows/android-linux.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
fail-fast: false
3333
matrix:
3434
build_type: [Release]
35-
qt_version: [6.6.3, 6.8.3]
35+
qt_version: [6.8.3]
3636

3737
defaults:
3838
run:
@@ -45,7 +45,7 @@ jobs:
4545
QT_ANDROID_KEYSTORE_ALIAS: QGCAndroidKeyStore
4646
QT_ANDROID_KEYSTORE_STORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
4747
QT_ANDROID_KEYSTORE_KEY_PASS: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
48-
QT_ANDROID_ABIS: ${{ (matrix.build_type == 'Release' && matrix.qt_version == '6.8.3') && 'armeabi-v7a;arm64-v8a' || 'arm64-v8a' }}
48+
QT_ANDROID_ABIS: ${{ matrix.build_type == 'Release' && 'arm64-v8a;armeabi-v7a' || 'arm64-v8a' }}
4949

5050
steps:
5151
- name: Checkout repo
@@ -62,7 +62,7 @@ jobs:
6262
uses: ./.github/actions/qt-android
6363
with:
6464
host: linux
65-
arch: ${{ matrix.qt_version == '6.6.3' && 'gcc_64' || 'linux_gcc_64' }}
65+
arch: linux_gcc_64
6666
version: ${{ matrix.qt_version }}
6767
abis: ${{ env.QT_ANDROID_ABIS }}
6868
cpm-modules: ${{ runner.temp }}/build/cpm_modules
@@ -77,7 +77,6 @@ jobs:
7777
-DQT_HOST_PATH="${{ env.QT_ROOT_DIR }}/../gcc_64"
7878
-DQT_ANDROID_SIGN_APK=${{ env.QT_ANDROID_KEYSTORE_STORE_PASS != '' && 'ON' || 'OFF' }}
7979
-DQGC_STABLE_BUILD=${{ github.ref_type == 'tag' || contains(github.ref, 'Stable') && 'ON' || 'OFF' }}
80-
-DQGC_ENABLE_HERELINK=${{ matrix.qt_version == '6.6.3' && 'ON' || 'OFF' }}
8180

8281
- name: Build
8382
working-directory: ${{ runner.temp }}/build
@@ -86,15 +85,15 @@ jobs:
8685
- run: cp ${{ runner.temp }}/build/android-build/*.apk ${{ runner.temp }}/build/${{ env.PACKAGE }}.apk
8786

8887
- name: Upload Build File
89-
if: matrix.build_type == 'Release' && matrix.qt_version == '6.8.3'
88+
if: matrix.build_type == 'Release'
9089
uses: ./.github/actions/upload
9190
with:
9291
artifact_name: ${{ env.PACKAGE }}.apk
9392
package_name: ${{ env.PACKAGE }}
9493
aws_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
9594
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
9695
github_token: ${{ secrets.GITHUB_TOKEN }}
97-
upload_aws: ${{ matrix.qt_version == '6.8.3' && 'true' || 'false' }}
96+
upload_aws: true
9897

9998
# - name: Deploy to Play Store
10099
# if: matrix.build_type == 'Release'

CMakeLists.txt

Lines changed: 5 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,6 @@ endif()
105105
# Qt6 Configuration
106106
#######################################################
107107

108-
# The values specified below are the ONLY supported configurations for this version of QGC.
109-
# Change these to something else at your own risk. Anything other than what is specified
110-
# here is unsupported so don't expect any help with problems.
111-
112-
if(QGC_ENABLE_HERELINK AND ANDROID)
113-
set(QGC_QT_MINIMUM_VERSION "6.6.3" CACHE STRING "Minimum Supported Qt Version")
114-
set(QGC_QT_MAXIMUM_VERSION "6.6.3" CACHE STRING "Maximum Supported Qt Version")
115-
set(QGC_QT_ANDROID_MIN_SDK_VERSION "25" CACHE STRING "Android Min SDK Version")
116-
else()
117-
set(QGC_QT_MINIMUM_VERSION "6.8.3" CACHE STRING "Minimum Supported Qt Version")
118-
set(QGC_QT_MAXIMUM_VERSION "6.8.3" CACHE STRING "Maximum Supported Qt Version")
119-
set(QGC_QT_ANDROID_MIN_SDK_VERSION "28" CACHE STRING "Android Min SDK Version")
120-
endif()
121-
122108
find_package(Qt6
123109
${QGC_QT_MINIMUM_VERSION}...${QGC_QT_MAXIMUM_VERSION}
124110
REQUIRED
@@ -157,16 +143,10 @@ if(LINUX)
157143
find_package(Qt6 COMPONENTS WaylandClient)
158144
endif()
159145

160-
# Set extra standard project setup options for Qt 6.7.0 and above
161-
set(EXTRA_STANDARD_PROJECT_SETUP_OPTIONS)
162-
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.7.0)
163-
list(APPEND EXTRA_STANDARD_PROJECT_SETUP_OPTIONS I18N_SOURCE_LANGUAGE en)
164-
endif()
165-
166146
qt_standard_project_setup(
167147
REQUIRES ${QGC_QT_MINIMUM_VERSION}
168148
SUPPORTS_UP_TO ${QGC_QT_MAXIMUM_VERSION}
169-
${EXTRA_STANDARD_PROJECT_SETUP_OPTIONS}
149+
I18N_SOURCE_LANGUAGE en
170150
)
171151

172152
qt_policy(
@@ -194,19 +174,12 @@ endif()
194174
list(APPEND QGC_RESOURCES
195175
${CMAKE_SOURCE_DIR}/qgcimages.qrc
196176
${CMAKE_SOURCE_DIR}/qgcresources.qrc
197-
${CMAKE_SOURCE_DIR}/qgroundcontrol.qrc
198177
)
199178

200179
list(APPEND QGC_RESOURCES
201180
${CMAKE_SOURCE_DIR}/resources/InstrumentValueIcons/InstrumentValueIcons.qrc
202-
${CMAKE_SOURCE_DIR}/src/FirmwarePlugin/APM/APMResources.qrc
203-
${CMAKE_SOURCE_DIR}/src/FirmwarePlugin/PX4/PX4Resources.qrc
204181
)
205182

206-
if(QGC_BUILD_TESTING)
207-
list(APPEND QGC_RESOURCES ${CMAKE_SOURCE_DIR}/test/UnitTest.qrc)
208-
endif()
209-
210183
#######################################################
211184
# QGroundControl Target
212185
#######################################################
@@ -234,7 +207,6 @@ qt_add_qml_module(${CMAKE_PROJECT_NAME}
234207
QtQuick.Controls
235208
QtQuick.Dialogs
236209
QtQuick.Layouts
237-
QtQuick.Window
238210
)
239211

240212
add_subdirectory(src)
@@ -246,31 +218,20 @@ endif()
246218
file(GLOB TS_SOURCES ${CMAKE_SOURCE_DIR}/translations/qgc_*.ts)
247219
set_source_files_properties(${TS_SOURCES} PROPERTIES OUTPUT_LOCATION "${CMAKE_BINARY_DIR}/i18n")
248220

249-
set(translations_options_arg)
250-
if(Qt6_VERSION VERSION_GREATER_EQUAL 6.7.0)
251-
list(APPEND translations_options_arg TS_FILE_DIR "${CMAKE_SOURCE_DIR}/translations")
252-
list(APPEND translations_options_arg TS_FILE_BASE ${CMAKE_PROJECT_NAME})
253-
endif()
254221
qt_add_translations(${CMAKE_PROJECT_NAME}
255222
TS_FILES ${TS_SOURCES}
256223
RESOURCE_PREFIX "/"
257224
LUPDATE_OPTIONS -no-obsolete
258-
${translations_options_arg}
225+
TS_FILE_DIR "${CMAKE_SOURCE_DIR}/translations"
226+
TS_FILE_BASE ${CMAKE_PROJECT_NAME}
259227
)
260228

261-
qgc_set_qt_resource_alias(
262-
${CMAKE_SOURCE_DIR}/resources/qtquickcontrols2.conf
263-
${SDL_GAMECONTROLLERDB_PATH}
264-
)
229+
qgc_set_qt_resource_alias(${CMAKE_SOURCE_DIR}/resources/qtquickcontrols2.conf)
265230

266231
qt_add_resources(${CMAKE_PROJECT_NAME} "qgcresources_cmake"
267232
PREFIX "/"
268233
FILES
269-
${CMAKE_SOURCE_DIR}/resources/qtquickcontrols2.conf
270-
${SDL_GAMECONTROLLERDB_PATH}
271-
${QGC_GSTREAMER_SHADER_RESOURCES}
272-
${QGC_ARDUPILOT_PARAMS_RESOURCES}
273-
# ${QGC_TEST_RESOURCES}
234+
"${CMAKE_SOURCE_DIR}/resources/qtquickcontrols2.conf"
274235
)
275236

276237
# cmake_print_variables(QT_ALL_PLUGIN_TYPES_FOUND_VIA_FIND_PACKAGE)

CodingStyle.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import QtQuick
1212
import QtQuick.Controls
1313

1414
import QGroundControl
15-
import QGroundControl.ScreenTools
15+
1616
import QGroundControl.Controls
1717

1818

android/AndroidManifest.xml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<?xml version="1.0"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.mavlink.qgroundcontrol"
43
android:installLocation="auto"
54
android:versionCode="-- %%INSERT_VERSION_CODE%% --"
65
android:versionName="-- %%INSERT_VERSION_NAME%% --">
76

8-
<supports-screens
9-
android:anyDensity="true"
10-
android:largeScreens="true"
11-
android:normalScreens="true"
12-
android:smallScreens="true" />
13-
147
<!-- %%INSERT_PERMISSIONS -->
158

169
<uses-permission android:name="android.permission.USB_PERMISSION" />
@@ -33,6 +26,12 @@
3326
<uses-feature android:name="android.hardware.usb.host" android:required="false" />
3427
<uses-feature android:name="android.hardware.wifi" android:required="false" />
3528

29+
<supports-screens
30+
android:anyDensity="true"
31+
android:largeScreens="true"
32+
android:normalScreens="true"
33+
android:smallScreens="true" />
34+
3635
<application
3736
android:name="org.qtproject.qt.android.bindings.QtApplication"
3837
android:hardwareAccelerated="true"
@@ -45,10 +44,8 @@
4544
android:networkSecurityConfig="@xml/network_security_config">
4645
<!-- android:theme="@style/AppTheme" -->
4746

48-
<!-- <meta-data android:name="android.app.system_libs_prefix" android:value="/system/lib/" /> -->
49-
5047
<activity
51-
android:name="org.mavlink.qgroundcontrol.QGCActivity"
48+
android:name="org.qtproject.qt.android.bindings.QtActivity"
5249
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
5350
android:label="-- %%INSERT_APP_NAME%% --"
5451
android:launchMode="singleTop"
@@ -64,11 +61,8 @@
6461
<action android:name="android.hardware.usb.action.USB_DEVICE_DETACHED" />
6562
<action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
6663
<action android:name="android.bluetooth.device.action.ACL_DISCONNECTED" />
67-
<!-- TODO: CMake configure xml file -->
68-
<!-- %%QGC_INSERT_ACTIVITY_INTENT_FILTER -->
6964
</intent-filter>
7065

71-
<!-- %%QGC_INSERT_ACTIVITY_META_DATA -->
7266
<meta-data
7367
android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
7468
android:resource="@xml/device_filter" />

0 commit comments

Comments
 (0)