diff --git a/CMakeCache.txt b/CMakeCache.txt new file mode 100644 index 000000000000..18ea520b92d0 --- /dev/null +++ b/CMakeCache.txt @@ -0,0 +1,737 @@ +# This is the CMakeCache file. +# For build in directory: /mnt/qgroundcontrol/qgroundcontrol +# It was generated by CMake: /opt/cmake/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Build using shared libraries +BUILD_SHARED_LIBS:BOOL=OFF + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Build type +CMAKE_BUILD_TYPE:STRING=Release + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//Configuration types +CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/lib/ccache/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//CXX compiler launcher +CMAKE_CXX_COMPILER_LAUNCHER:STRING=/usr/bin/ccache + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/lib/ccache/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9 + +//C compiler launcher +CMAKE_C_COMPILER_LAUNCHER:STRING=/usr/bin/ccache + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Value Computed by CMake. +CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol/CMakeFiles/pkgRedirects + +//User executables (bin) +CMAKE_INSTALL_BINDIR:PATH=bin + +//Read-only architecture-independent data (DATAROOTDIR) +CMAKE_INSTALL_DATADIR:PATH= + +//Read-only architecture-independent data root (share) +CMAKE_INSTALL_DATAROOTDIR:PATH=share + +//Documentation root (DATAROOTDIR/doc/PROJECT_NAME) +CMAKE_INSTALL_DOCDIR:PATH= + +//C header files (include) +CMAKE_INSTALL_INCLUDEDIR:PATH=include + +//Info documentation (DATAROOTDIR/info) +CMAKE_INSTALL_INFODIR:PATH= + +//Object code libraries (lib) +CMAKE_INSTALL_LIBDIR:PATH=lib + +//Program executables (libexec) +CMAKE_INSTALL_LIBEXECDIR:PATH=libexec + +//Locale-dependent data (DATAROOTDIR/locale) +CMAKE_INSTALL_LOCALEDIR:PATH= + +//Modifiable single-machine data (var) +CMAKE_INSTALL_LOCALSTATEDIR:PATH=var + +//Man documentation (DATAROOTDIR/man) +CMAKE_INSTALL_MANDIR:PATH= + +//C header files for non-gcc (/usr/include) +CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include + +//Install path prefix for AppImage +CMAKE_INSTALL_PREFIX:PATH=/mnt/qgroundcontrol/qgroundcontrol/AppDir/usr + +//Run-time variable data (LOCALSTATEDIR/run) +CMAKE_INSTALL_RUNSTATEDIR:PATH= + +//System admin executables (sbin) +CMAKE_INSTALL_SBINDIR:PATH=sbin + +//Modifiable architecture-independent data (com) +CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com + +//Read-only single-machine data (etc) +CMAKE_INSTALL_SYSCONFDIR:PATH=etc + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC=Open Source Ground Control App + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC=https://qgroundcontrol.com + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=QGroundControl + +//Value Computed by CMake +CMAKE_PROJECT_VERSION:STATIC=5.0.3 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MAJOR:STATIC=5 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_MINOR:STATIC=0 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_PATCH:STATIC=3 + +//Value Computed by CMake +CMAKE_PROJECT_VERSION_TWEAK:STATIC= + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//Path to a program. +CMAKE_TAPI:FILEPATH=CMAKE_TAPI-NOTFOUND + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Don't create a package lock file in the binary path +CPM_DONT_CREATE_PACKAGE_LOCK:BOOL=OFF + +//Don't update the module path to allow using find_package +CPM_DONT_UPDATE_MODULE_PATH:BOOL=OFF + +//Always download dependencies from source +CPM_DOWNLOAD_ALL:BOOL=OFF + +//Add all packages added through CPM.cmake to the package lock +CPM_INCLUDE_ALL_IN_PACKAGE_LOCK:BOOL=OFF + +//Only use `find_package` to get dependencies +CPM_LOCAL_PACKAGES_ONLY:BOOL=OFF + +//Directory to download CPM dependencies +CPM_SOURCE_CACHE:PATH=/mnt/qgroundcontrol/qgroundcontrol/cpm_modules + +//Always try to use `find_package` to get dependencies +CPM_USE_LOCAL_PACKAGES:BOOL=OFF + +//Use additional directory of package name in cache on the most +// nested level. +CPM_USE_NAMED_CACHE_DIRECTORIES:BOOL=OFF + +//Directory under which to collect all populated content +FETCHCONTENT_BASE_DIR:PATH=/mnt/qgroundcontrol/qgroundcontrol/_deps + +//Disables all attempts to download or update content and assumes +// source dirs already exist +FETCHCONTENT_FULLY_DISCONNECTED:BOOL=OFF + +//Enables QUIET option for all content population +FETCHCONTENT_QUIET:BOOL=ON + +//Enables UPDATE_DISCONNECTED behavior for all content population +FETCHCONTENT_UPDATES_DISCONNECTED:BOOL=OFF + +//Git command line client +GIT_EXECUTABLE:FILEPATH=/usr/bin/git + +//Check submodules during build +GIT_SUBMODULE:BOOL=OFF + +//Disable AIRLink +QGC_AIRLINK_DISABLED:BOOL=ON + +//Android Package Name +QGC_ANDROID_PACKAGE_NAME:STRING=org.mavlink.qgroundcontrol + +//Android Package Path +QGC_ANDROID_PACKAGE_SOURCE_DIR:PATH=/mnt/qgroundcontrol/qgroundcontrol/android + +//AppImage Metadata Developer +QGC_APPIMAGE_APPDATA_DEVELOPER:STRING=qgroundcontrol + +//AppImage AppRun Path +QGC_APPIMAGE_APPRUN_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/AppRun + +//AppImage Desktop Entry Path +QGC_APPIMAGE_DESKTOP_ENTRY_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/org.mavlink.qgroundcontrol.desktop.in + +//AppImage Icon 256x256 Path +QGC_APPIMAGE_ICON_256_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/QGroundControl_256.png + +//AppImage Icon SVG Path +QGC_APPIMAGE_ICON_SCALABLE_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/QGroundControl.svg + +//AppImage Metadata Path +QGC_APPIMAGE_METADATA_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/linux/org.mavlink.qgroundcontrol.appdata.xml.in + +//Copyright +QGC_APP_COPYRIGHT:STRING=Copyright (c) 2025 QGroundControl. All rights reserved. + +//Description +QGC_APP_DESCRIPTION:STRING=Open Source Ground Control App + +//App Name +QGC_APP_NAME:STRING=QGroundControl + +//Path to a program. +QGC_CACHE_PROGRAM:FILEPATH=/usr/bin/ccache + +//Directory to Download CPM Dependencies, Overrides CPM_SOURCE_CACHE +// Env Variable +QGC_CPM_SOURCE_CACHE:PATH= + +//Build an AppImage after build +QGC_CREATE_APPIMAGE:BOOL=ON + +//Enable Using QGC Provided Custom GStreamer Packages +QGC_CUSTOM_GST_PACKAGE:BOOL=OFF + +//Disable APM Dialect +QGC_DISABLE_APM_MAVLINK:BOOL=OFF + +//Disable APM Plugin +QGC_DISABLE_APM_PLUGIN:BOOL=OFF + +//Disable APM Plugin Factory +QGC_DISABLE_APM_PLUGIN_FACTORY:BOOL=OFF + +//Disable PX4 Plugin +QGC_DISABLE_PX4_PLUGIN:BOOL=OFF + +//Disable PX4 Plugin Factory +QGC_DISABLE_PX4_PLUGIN_FACTORY:BOOL=OFF + +//Enable Bluetooth Links +QGC_ENABLE_BLUETOOTH:BOOL=ON + +//Enable GStreamer Video Backend +QGC_ENABLE_GST_VIDEOSTREAMING:BOOL=ON + +//Enable QtMultimedia Video Backend +QGC_ENABLE_QT_VIDEOSTREAMING:BOOL=OFF + +//Enable UVC Devices +QGC_ENABLE_UVC:BOOL=ON + +//MacOS Bundle ID +QGC_MACOS_BUNDLE_ID:STRING=org.mavlink.qgroundcontrol + +//MacOS Entitlements Path +QGC_MACOS_ENTITLEMENTS_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/qgroundcontrol.entitlements + +//MacOS Icon Path +QGC_MACOS_ICON_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/qgroundcontrol.icns + +//MacOS PList Path +QGC_MACOS_PLIST_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/macos/MacOSXBundleInfo.plist.in + +//Build MacOS Universal Build (arm64;x86_64) +QGC_MACOS_UNIVERSAL_BUILD:BOOL=ON + +//URL to MAVLink Git Repo +QGC_MAVLINK_GIT_REPO:STRING=https://github.com/mavlink/c_library_v2.git + +//Tag of MAVLink Git Repo +QGC_MAVLINK_GIT_TAG:STRING=19f9955598af9a9181064619bd2e3c04bd2d848a + +//Disable Serial Links +QGC_NO_SERIAL_LINK:BOOL=OFF + +//Domain +QGC_ORG_DOMAIN:STRING=qgroundcontrol.com + +//Org Name +QGC_ORG_NAME:STRING=QGroundControl + +//Package Name +QGC_PACKAGE_NAME:STRING=org.mavlink.qgroundcontrol + +//Android Min SDK Version +QGC_QT_ANDROID_MIN_SDK_VERSION:STRING=28 + +//Android Target SDK Version +QGC_QT_ANDROID_TARGET_SDK_VERSION:STRING=36 + +//Maximum Supported Qt Version +QGC_QT_MAXIMUM_VERSION:STRING=6.8.3 + +//Minimum Supported Qt Version +QGC_QT_MINIMUM_VERSION:STRING=6.8.3 + +//Settings Version +QGC_SETTINGS_VERSION:STRING=9 + +//Stable Build +QGC_STABLE_BUILD:BOOL=OFF + +//Use Build Caching +QGC_USE_CACHE:BOOL=ON + +//Enable UTM Adapter +QGC_UTM_ADAPTER:BOOL=OFF + +//Enable Viewer3D +QGC_VIEWER3D:BOOL=ON + +//Windows Icon Path +QGC_WINDOWS_ICON_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/WindowsQGC.ico + +//Windows Install Header Path +QGC_WINDOWS_INSTALL_HEADER_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/installheader.bmp + +//Windows Resource File Path +QGC_WINDOWS_RESOURCE_FILE_PATH:FILEPATH=/mnt/qgroundcontrol/qgroundcontrol/deploy/windows/QGroundControl.rc + +//Enable ZeroConf Compatibility +QGC_ZEROCONF_ENABLED:BOOL=OFF + +//Value Computed by CMake +QGroundControl_BINARY_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol + +//Value Computed by CMake +QGroundControl_IS_TOP_LEVEL:STATIC=ON + +//Value Computed by CMake +QGroundControl_SOURCE_DIR:STATIC=/mnt/qgroundcontrol/qgroundcontrol + +//Extra QML Import Paths +QML_IMPORT_PATH:STRING=/mnt/qgroundcontrol/qgroundcontrol/qml + +//Forces Signing if Set to Release +QT_ANDROID_DEPLOYMENT_TYPE:STRING= + +//Enable Signing AAB +QT_ANDROID_SIGN_AAB:BOOL=OFF + +//Enable Signing APK +QT_ANDROID_SIGN_APK:BOOL=OFF + +//Print Used Search Paths When a Package is Not Found +QT_DEBUG_FIND_PACKAGE:BOOL=ON + +//Verbose Deployment +QT_ENABLE_VERBOSE_DEPLOYMENT:BOOL=OFF + +//https://doc.qt.io/qt-6/cmake-variable-qt-qml-generate-qmlls-ini.html +QT_QML_GENERATE_QMLLS_INI:BOOL=ON + +//Install path for QML +QT_QML_OUTPUT_DIRECTORY:PATH=/mnt/qgroundcontrol/qgroundcontrol/qml + +//Silence Missing Dependency Warnings +QT_SILENCE_MISSING_DEPENDENCY_TARGET_WARNING:BOOL=OFF + +//Use Target Android Build Dir +QT_USE_TARGET_ANDROID_BUILD_DIR:BOOL=OFF + +//The directory containing a CMake configuration file for Qt6. +Qt6_DIR:PATH=Qt6_DIR-NOTFOUND + + +######################## +# INTERNAL cache entries +######################## + +BUILD_TESTING:INTERNAL=OFF +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=27 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/opt/cmake/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/opt/cmake/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/opt/cmake/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Test CMAKE_CXX_LINK_NO_PIE_SUPPORTED +CMAKE_CXX_LINK_NO_PIE_SUPPORTED:INTERNAL=1 +//Test CMAKE_CXX_LINK_PIE_SUPPORTED +CMAKE_CXX_LINK_PIE_SUPPORTED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Test CMAKE_C_LINK_NO_PIE_SUPPORTED +CMAKE_C_LINK_NO_PIE_SUPPORTED:INTERNAL=1 +//Test CMAKE_C_LINK_PIE_SUPPORTED +CMAKE_C_LINK_PIE_SUPPORTED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Path to cache edit program executable. +CMAKE_EDIT_COMMAND:INTERNAL=/opt/cmake/bin/ccmake +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol +//ADVANCED property for variable: CMAKE_INSTALL_BINDIR +CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATADIR +CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR +CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR +CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR +CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_INFODIR +CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR +CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR +CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR +CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR +CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_MANDIR +CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR +CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR +CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR +CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR +CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1 +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR +CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/opt/cmake/share/cmake-3.27 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_TAPI +CMAKE_TAPI-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +CPM_DIRECTORY:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cmake/modules +//Don't download or configure dependencies (for testing) +CPM_DRY_RUN:INTERNAL=OFF +CPM_FILE:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cmake/modules/CPM.cmake +CPM_INDENT:INTERNAL=CPM: +CPM_PACKAGES:INTERNAL= +CPM_PACKAGE_LOCK_FILE:INTERNAL=/mnt/qgroundcontrol/qgroundcontrol/cpm-package-lock.cmake +CPM_VERSION:INTERNAL=0.40.8 +//Details about finding Git +FIND_PACKAGE_MESSAGE_DETAILS_Git:INTERNAL=[/usr/bin/git][v2.25.1()] +//ADVANCED property for variable: GIT_EXECUTABLE +GIT_EXECUTABLE-ADVANCED:INTERNAL=1 +//Test HAVE_LD_mold +HAVE_LD_mold:INTERNAL=1 +//linker supports push/pop state +_CMAKE_LINKER_PUSHPOP_STATE_SUPPORTED:INTERNAL=TRUE +//CMAKE_INSTALL_PREFIX during last run +_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=/usr/local + diff --git a/cpm-package-lock.cmake b/cpm-package-lock.cmake new file mode 100644 index 000000000000..67eeaba64f31 --- /dev/null +++ b/cpm-package-lock.cmake @@ -0,0 +1,3 @@ +# CPM Package Lock +# This file should be committed to version control + diff --git a/src/Gimbal/GimbalController.cc b/src/Gimbal/GimbalController.cc index 7cb90402158f..00a8f767904c 100644 --- a/src/Gimbal/GimbalController.cc +++ b/src/Gimbal/GimbalController.cc @@ -15,6 +15,7 @@ #include "QmlObjectListModel.h" #include "SettingsManager.h" #include "Vehicle.h" +#include QGC_LOGGING_CATEGORY(GimbalControllerLog, "qgc.gimbal.gimbalcontroller") @@ -590,6 +591,53 @@ void GimbalController::sendRate() } } +void GimbalController::sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg_s) +{ + if (!_tryGetGimbalControl()) { + return; + } + + _sendGimbalAttitudeRates(pitch_rate_deg_s, yaw_rate_deg_s); + + if (pitch_rate_deg_s == 0.f && yaw_rate_deg_s == 0.f) { + _rateSenderTimer.stop(); + } else { + _rateSenderTimer.start(); + } +} + +void GimbalController::_sendGimbalAttitudeRates(float pitch_rate_deg_s, + float yaw_rate_deg_s) +{ + auto sharedLink = _vehicle->vehicleLinkManager()->primaryLink().lock(); + if (!sharedLink) { + qCDebug(GimbalControllerLog) << "_sendGimbalAttitudeRates: primary link gone!"; + return; + } + + uint32_t flags = GIMBAL_MANAGER_FLAGS_ROLL_LOCK | GIMBAL_MANAGER_FLAGS_PITCH_LOCK; + + const float qnan[4] = {NAN, NAN, NAN, NAN}; + mavlink_message_t msg; + + mavlink_msg_gimbal_manager_set_attitude_pack_chan( + MAVLinkProtocol::instance()->getSystemId(), + MAVLinkProtocol::getComponentId(), + sharedLink->mavlinkChannel(), + &msg, + _vehicle->id(), + static_cast(_activeGimbal->managerCompid()->rawValue().toUInt()), + flags, + static_cast(_activeGimbal->deviceId()->rawValue().toUInt()), + qnan, + NAN, + qDegreesToRadians(pitch_rate_deg_s), + qDegreesToRadians(yaw_rate_deg_s) + ); + + _vehicle->sendMessageOnLinkThreadSafe(sharedLink.get(), msg); +} + void GimbalController::_rateSenderTimeout() { // Send rate again to avoid timeout on autopilot side. diff --git a/src/Gimbal/GimbalController.h b/src/Gimbal/GimbalController.h index 4a2601ed587f..c0a7422376bb 100644 --- a/src/Gimbal/GimbalController.h +++ b/src/Gimbal/GimbalController.h @@ -49,6 +49,8 @@ class GimbalController : public QObject Q_INVOKABLE void releaseGimbalControl(); Q_INVOKABLE void sendRate(); + Q_INVOKABLE void sendGimbalRate(float pitch_rate_deg_s, float yaw_rate_deg_s); + signals: void activeGimbalChanged(); void showAcquireGimbalControlPopup(); // This triggers a popup in QML asking the user for aproval to take control @@ -104,6 +106,8 @@ private slots: bool _tryGetGimbalControl(); bool _yawInVehicleFrame(uint32_t flags); + void _sendGimbalAttitudeRates(float pitch_rate_deg_s, float yaw_rate_deg_s); + QTimer _rateSenderTimer; Vehicle *_vehicle = nullptr; Gimbal *_activeGimbal = nullptr; diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index 07b92d368bed..5cda499c59f6 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -576,6 +576,61 @@ void Joystick::_handleButtons() } } +float applyDeadzone(float value, float deadzone) { + if (std::abs(value) < deadzone) { + return 0.0f; + }else if(value<0){ + value=value+deadzone; + }else if(value>0){ + value=value-deadzone; + } + return value; + } + +void Joystick::setGimbalYawDeadzone(int deadzone) { + if (_rgCalibration[4].deadband != deadzone) { + _rgCalibration[4].deadband = deadzone; + _saveSettings(); + emit gimbalYawDeadzoneChanged(); + } +} +void Joystick::setGimbalPitchDeadzone(int deadzone) { + if (_rgCalibration[5].deadband != deadzone) { + _rgCalibration[5].deadband = deadzone; + _saveSettings(); + emit gimbalPitchDeadzoneChanged(); + } +} +void Joystick::setGimbalMaxSpeed(int speed) +{ + if (_gimbalMaxSpeed != speed) { + _gimbalMaxSpeed = speed; + emit gimbalMaxSpeedChanged(); + _saveSettings(); + } +} + +void Joystick::setGimbalAxisEnabled(bool enabled) +{ + if (_gimbalAxisEnabled != enabled) { + _gimbalAxisEnabled = enabled; + emit gimbalAxisEnabledChanged(enabled); + _saveSettings(); + // Send a zero-rate command once when the state flips + if (_activeVehicle) { + if (auto* gc = _activeVehicle->gimbalController()) { + QMetaObject::invokeMethod( + gc, + "sendGimbalRate", + Qt::QueuedConnection, + Q_ARG(float, 0.0f), + Q_ARG(float, 0.0f) + ); + } + } + } +} + void Joystick::_handleAxis() { const int axisDelay = static_cast(1000.0f / _axisFrequencyHz); @@ -609,17 +664,62 @@ void Joystick::_handleAxis() float throttle = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis], (_throttleMode == ThrottleModeDownZero) ? false :_deadband); float gimbalPitch = 0.0f; + float gimbalYaw = 0.0f; + if (_axisCount > 4) { axis = _rgFunctionAxis[gimbalPitchFunction]; gimbalPitch = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis],_deadband); } - float gimbalYaw = 0.0f; if (_axisCount > 5) { axis = _rgFunctionAxis[gimbalYawFunction]; gimbalYaw = _adjustRange(_rgAxisValues[axis], _rgCalibration[axis],_deadband); } + if (_axisCount > 5 && _gimbalAxisEnabled) { + int pitchAxisIndex = 5; + float gimbalPitchNorm = _adjustRange(_rgAxisValues[pitchAxisIndex], _rgCalibration[pitchAxisIndex], _deadband); + float gimbalPitchDeg = gimbalPitchNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); + gimbalPitchDeg=gimbalPitchDeg-5; + + float gimbalPitchDeadzone = static_cast(_rgCalibration[5].deadband); + float gimbalPitchOut = applyDeadzone(gimbalPitchDeg, gimbalPitchDeadzone); + + int yawAxisIndex = 4; + float gimbalYawNorm = _adjustRange(_rgAxisValues[yawAxisIndex], _rgCalibration[yawAxisIndex], _deadband); + float gimbalYawDeg = gimbalYawNorm * (2.0f * static_cast(_gimbalMaxSpeed)) - static_cast(_gimbalMaxSpeed); + gimbalYawDeg=gimbalYawDeg-4; + + float gimbalYawDeadzone = static_cast(_rgCalibration[4].deadband); + float gimbalYawOut = applyDeadzone(gimbalYawDeg, gimbalYawDeadzone); + + if (std::abs(gimbalPitchOut) == 0) { + zeroPitchCount++; + } else { + zeroPitchCount = 0; + } + + if (std::abs(gimbalYawOut) == 0) { + zeroYawCount++; + } else { + zeroYawCount = 0; + } + + if (!(zeroPitchCount >= 3 && zeroYawCount >= 3)) { + if (_activeVehicle) { + if (auto* gc = _activeVehicle->gimbalController()) { + QMetaObject::invokeMethod( + gc, + "sendGimbalRate", + Qt::QueuedConnection, + Q_ARG(float, gimbalPitchOut), + Q_ARG(float, gimbalYawOut) + ); + } + } + } + } + if (_accumulator) { static float throttle_accu = 0.f; throttle_accu += (throttle * (40 / 1000.f)); // for throttle to change from min to max it will take 1000ms (40ms is a loop time) @@ -986,6 +1086,11 @@ void Joystick::setCalibrationMode(bool calibrating) _pollingStartedForCalibration = true; startPolling(MultiVehicleManager::instance()->activeVehicle()); } else if (_pollingStartedForCalibration) { + if (_axisCount > 5) { + _rgFunctionAxis[gimbalYawFunction] = 4; + _rgFunctionAxis[gimbalPitchFunction] = 5; + } + _saveSettings(); stopPolling(); } } diff --git a/src/Joystick/Joystick.h b/src/Joystick/Joystick.h index 95db3b2ea04a..71d591dc717e 100644 --- a/src/Joystick/Joystick.h +++ b/src/Joystick/Joystick.h @@ -82,6 +82,10 @@ class Joystick : public QThread Q_PROPERTY(QString name READ name CONSTANT) Q_PROPERTY(QStringList assignableActionTitles READ assignableActionTitles NOTIFY assignableActionsChanged) Q_PROPERTY(QStringList buttonActions READ buttonActions NOTIFY buttonActionsChanged) + Q_PROPERTY(int gimbalPitchDeadzone READ gimbalPitchDeadzone WRITE setGimbalPitchDeadzone NOTIFY gimbalPitchDeadzoneChanged) + Q_PROPERTY(int gimbalYawDeadzone READ gimbalYawDeadzone WRITE setGimbalYawDeadzone NOTIFY gimbalYawDeadzoneChanged) + Q_PROPERTY(bool gimbalAxisEnabled READ gimbalAxisEnabled WRITE setGimbalAxisEnabled NOTIFY gimbalAxisEnabledChanged) + Q_PROPERTY(int gimbalMaxSpeed READ gimbalMaxSpeed WRITE setGimbalMaxSpeed NOTIFY gimbalMaxSpeedChanged) enum ButtonEvent_t { BUTTON_UP, @@ -183,6 +187,17 @@ class Joystick : public QThread /// Set joystick button repeat rate (in Hz) void setButtonFrequency(float val); + int gimbalPitchDeadzone() const { return _rgCalibration[5].deadband; } + int gimbalYawDeadzone() const { return _rgCalibration[4].deadband; } + int gimbalMaxSpeed() const { return _gimbalMaxSpeed; } + + Q_INVOKABLE void setGimbalPitchDeadzone(int deadzone); + Q_INVOKABLE void setGimbalYawDeadzone(int deadzone); + Q_INVOKABLE void setGimbalMaxSpeed(int speed); + + bool gimbalAxisEnabled() const { return _gimbalAxisEnabled; } + Q_INVOKABLE void setGimbalAxisEnabled(bool enabled); + signals: // The raw signals are only meant for use by calibration void rawAxisValueChanged(int index, int value); @@ -224,6 +239,11 @@ class Joystick : public QThread void motorInterlock(bool enable); void unknownAction(const QString &action); + void gimbalPitchDeadzoneChanged(); + void gimbalYawDeadzoneChanged(); + void gimbalMaxSpeedChanged(); + void gimbalAxisEnabledChanged(bool enabled); + protected: void _setDefaultCalibration(); @@ -366,4 +386,9 @@ private slots: static constexpr const char *_buttonActionLandingGearRetract= QT_TR_NOOP("Landing gear retract"); static constexpr const char *_buttonActionMotorInterlockEnable= QT_TR_NOOP("Motor Interlock enable"); static constexpr const char *_buttonActionMotorInterlockDisable= QT_TR_NOOP("Motor Interlock disable"); + + bool _gimbalAxisEnabled = true; + int _gimbalMaxSpeed = 80; // Default max speed + int zeroPitchCount = 0; + int zeroYawCount = 0; }; diff --git a/src/Joystick/JoystickAndroid.cc b/src/Joystick/JoystickAndroid.cc index aaa58b882447..06ece31e3d9a 100644 --- a/src/Joystick/JoystickAndroid.cc +++ b/src/Joystick/JoystickAndroid.cc @@ -298,4 +298,4 @@ void JoystickAndroid::setNativeMethods() } (void) AndroidInterface::cleanJavaException(); -} +} \ No newline at end of file diff --git a/src/Joystick/JoystickAndroid.h b/src/Joystick/JoystickAndroid.h index 8f1b7acb218f..235002a755d4 100644 --- a/src/Joystick/JoystickAndroid.h +++ b/src/Joystick/JoystickAndroid.h @@ -52,4 +52,4 @@ class JoystickAndroid : public Joystick, public QtAndroidPrivate::GenericMotionE static int ACTION_DOWN, ACTION_UP, AXIS_HAT_X, AXIS_HAT_Y; static QMutex _mutex; -}; +}; \ No newline at end of file diff --git a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml index aa88f0d05989..f4758a377fb2 100644 --- a/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml +++ b/src/Vehicle/VehicleSetup/JoystickConfigCalibration.qml @@ -13,11 +13,7 @@ import QtQuick.Dialogs import QtQuick.Layouts import QGroundControl - import QGroundControl.Controls - - - import QGroundControl.FactControls Item { @@ -197,6 +193,104 @@ Item { horizontalAlignment: Text.AlignHCenter anchors.horizontalCenter: parent.horizontalCenter } + + Rectangle { + width: parent.width * 0.9 + height: 100 + color: "transparent" + radius: 8 + anchors.horizontalCenter: parent.horizontalCenter + anchors.topMargin: ScreenTools.defaultFontPixelHeight + + Column { + anchors.margins: ScreenTools.defaultFontPixelHeight + spacing: ScreenTools.defaultFontPixelHeight * 0.5 + + QGCLabel { + text: qsTr("Gimbal Control Info") + font.bold: true + } + QGCLabel { + text: qsTr("Axis 5 = Gimbal Pitch | Axis 4 = Gimbal Yaw") + color: qgcPal.text + } + + // Gimbal Deadzone Axis 4 (Yaw) + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Yaw Deadzone (Axis 4):") + width: 220 + } + Slider { + id: yawDeadzoneSlider + width: 150 + from: 0 + to: 20 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalYawDeadzone : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalYawDeadzone = value + } + QGCLabel { text: yawDeadzoneSlider.value.toFixed(0) } + } + + // Gimbal Deadzone Axis 5 Pitch + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Pitch Deadzone (Axis 5):") + width: 220 + } + Slider { + id: pitchDeadzoneSlider + width: 150 + from: 0 + to: 20 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalPitchDeadzone : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalPitchDeadzone = value + } + QGCLabel { text: pitchDeadzoneSlider.value.toFixed(0) } + } + + // Gimbal Speed + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Max Speed:") + width: 220 + } + Slider { + id: speedSlider + width: 150 + from: 0 + to: 100 + stepSize: 1 + value: _activeJoystick ? _activeJoystick.gimbalMaxSpeed : 0 + onValueChanged: if (_activeJoystick) _activeJoystick.gimbalMaxSpeed = value + } + QGCLabel { text: speedSlider.value.toFixed(0) } + } + + Row { + spacing: ScreenTools.defaultFontPixelWidth * 2 + QGCLabel { + text: qsTr("Gimbal Axis Control:") + width: 220 + } + Switch { + id: gimbalAxisSwitch + checked: _activeJoystick ? _activeJoystick.gimbalAxisEnabled : true + onToggled: if (_activeJoystick) _activeJoystick.gimbalAxisEnabled = checked + } + QGCLabel { + text: gimbalAxisSwitch.checked ? qsTr("Enabled") : qsTr("Disabled") + } + } + + } + } + } } diff --git a/src/Vehicle/VehicleSetup/JoystickConfigController.cc b/src/Vehicle/VehicleSetup/JoystickConfigController.cc index 1981f6c1edc2..4644d28113e7 100644 --- a/src/Vehicle/VehicleSetup/JoystickConfigController.cc +++ b/src/Vehicle/VehicleSetup/JoystickConfigController.cc @@ -61,6 +61,8 @@ const JoystickConfigController::stateMachineEntry* JoystickConfigController::_ge static constexpr const char* msgPitchDown = "Move the Pitch stick all the way down and hold it there..."; static constexpr const char* msgPitchUp = "Move the Pitch stick all the way up and hold it there..."; static constexpr const char* msgPitchCenter = "Allow the Pitch stick to move back to center..."; + static constexpr const char* msgGimbalPitch = "Move the gimbal pitch axis/knob..."; + static constexpr const char* msgGimbalYaw = "Move the gimbal yaw axis/knob..."; static constexpr const char* msgComplete = "All settings have been captured.\nClick Next to enable the joystick."; static const stateMachineEntry rgStateMachine[] = { @@ -75,7 +77,9 @@ const JoystickConfigController::stateMachineEntry* JoystickConfigController::_ge { Joystick::pitchFunction, msgPitchUp, _sticksPitchUp, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 3 }, { Joystick::pitchFunction, msgPitchDown, _sticksPitchDown, &JoystickConfigController::_inputStickMin, nullptr, nullptr, 3 }, { Joystick::pitchFunction, msgPitchCenter, _sticksCentered, &JoystickConfigController::_inputCenterWait, nullptr, nullptr, 3 }, - { Joystick::maxFunction, msgComplete, _sticksCentered, nullptr, &JoystickConfigController::_writeCalibration, nullptr, -1 }, + { Joystick::gimbalPitchFunction, msgGimbalPitch, _sticksCentered, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 4 }, + { Joystick::gimbalYawFunction, msgGimbalYaw, _sticksCentered, &JoystickConfigController::_inputStickDetect, nullptr, nullptr, 5 }, + { Joystick::maxFunction, msgComplete, _sticksCentered, nullptr, &JoystickConfigController::_writeCalibration, nullptr, -1 }, }; Q_ASSERT(step >= 0 && step < static_cast((sizeof(rgStateMachine) / sizeof(rgStateMachine[0])))); @@ -263,7 +267,7 @@ void JoystickConfigController::_inputStickDetect(Joystick::AxisFunction_t functi if (_rgAxisInfo[axis].function != Joystick::maxFunction) { return; } - + if (_stickDetectAxis == _axisNoAxis) { // We have not detected enough movement on a axis yet if (abs(_axisValueSave[axis] - value) > _calMoveDelta) {