diff --git a/.travis.yml b/.travis.yml index c5f360f05bff4ec32fa8dc1441f45c3c4939dab1..41f783670e3c83cd8c971d5dbf78aaff0939d5bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: sudo: false - os: android language: android - env: SPEC=android-g++ CONFIG=release + env: SPEC=android-g++ CONFIG=installer sudo: false android: @@ -78,7 +78,10 @@ install: fi -before_script: qmake -r qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC} +before_script: + - if [[ "${TRAVIS_OS_NAME}" = "android" && "${CONFIG}" = "installer" && -z ${ANDROID_STOREPASS} ]]; then export CONFIG=release; fi + - qmake -r qgroundcontrol.pro CONFIG+=${CONFIG} CONFIG+=WarningsAsErrorsOn -spec ${SPEC} + script: - echo 'Building QGroundControl' && echo -en 'travis_fold:start:script.1\\r' - make -j4 @@ -87,18 +90,31 @@ script: - if [[ "${TRAVIS_OS_NAME}" = "linux" && "${CONFIG}" = "debug" ]]; then ./debug/qgroundcontrol --unittest; fi - if [[ "${TRAVIS_OS_NAME}" = "osx" && "${CONFIG}" = "debug" ]]; then ./debug/qgroundcontrol.app/Contents/MacOS/qgroundcontrol --unittest; fi - echo -en 'travis_fold:end:script.2\\r' - - if [ "${TRAVIS_OS_NAME}" = "android" ]; then make install INSTALL_ROOT=./release/android-build/ && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle; fi - - if [[ "${TRAVIS_OS_NAME}" = "android" && "${CONFIG}" = "release" && "${TRAVIS_SECURE_ENV_VARS}" = "true" ]]; then androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle --sign android/android_release.keystore dagar --storepass ${ANDROID_STOREPASS}; fi deploy: - provider: releases - api-key: - secure: "" - file: "release/qgroundcontrol.dmg" - skip_cleanup: true - on: - tags: true - all_branches: true + - provider: s3 + access_key_id: AKIAIVORNALE7NHD3T6Q + secret_access_key: + secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= + bucket: qgroundcontrol + local_dir: release/package + upload-dir: ${TRAVIS_BRANCH} + acl: public_read + skip_cleanup: true + on: + all_branches: true + condition: $CONFIG = installer + - provider: releases + api-key: + secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ= + file: + - release/package/qgroundcontrol.apk + - release/package/qgroundcontrol.dmg + - release/package/qgroundcontrol.tar.bz2 + skip_cleanup: true + on: + tags: true + condition: $CONFIG = installer notifications: webhooks: diff --git a/QGCInstaller.pri b/QGCInstaller.pri index d7bf0d2bccb48a9f84e84c3a0301af6ae63e9bf7..b5d1ae5331b4f67d263dfb96adf83ddd29957dbd 100644 --- a/QGCInstaller.pri +++ b/QGCInstaller.pri @@ -36,10 +36,10 @@ installer { # We cd to release directory so we can run macdeployqt without a path to the # qgroundcontrol.app file. If you specify a path to the .app file the symbolic # links to plugins will not be created correctly. - QMAKE_POST_LINK += && cd release + QMAKE_POST_LINK += && cd release && mkdir package QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=../src QMAKE_POST_LINK += && cd .. - QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/qgroundcontrol.dmg + QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/package/qgroundcontrol.dmg } WindowsBuild { # The pdb moving command are commented out for now since we are including the .pdb in the installer. This makes it much @@ -52,6 +52,13 @@ installer { OTHER_FILES += deploy/qgroundcontrol_installer.nsi } LinuxBuild { - QMAKE_POST_LINK += && tar -cjf qgroundcontrol.tar.bz2 release --transform 's/release/qgroundcontrol/' + QMAKE_POST_LINK += && mkdir -p release/package + QMAKE_POST_LINK += && tar -cjf release/package/qgroundcontrol.tar.bz2 release --exclude='package' --transform 's/release/qgroundcontrol/' + } + AndroidBuild { + QMAKE_POST_LINK += && mkdir -p release/package + QMAKE_POST_LINK += && make install INSTALL_ROOT=release/android-build/ + QMAKE_POST_LINK += && androiddeployqt --input android-libqgroundcontrol.so-deployment-settings.json --output release/android-build --deployment bundled --gradle --sign android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS) + QMAKE_POST_LINK += && cp release/android-build/build/outputs/apk/android-build-release-signed.apk release/package/qgroundcontrol.apk } } diff --git a/src/Joystick/Joystick.cc b/src/Joystick/Joystick.cc index fb69ea88ed75d8ce12b85db47f335180d0d91e80..e5abd1445161a096413a1d5ad7f6c8fb9c62e0a3 100644 --- a/src/Joystick/Joystick.cc +++ b/src/Joystick/Joystick.cc @@ -124,7 +124,7 @@ void Joystick::_loadSettings(void) calibration->min = settings.value(minTpl.arg(axis), -32768).toInt(&convertOk); badSettings |= !convertOk; - calibration->max = settings.value(maxTpl.arg(axis), 32768).toInt(&convertOk); + calibration->max = settings.value(maxTpl.arg(axis), 32767).toInt(&convertOk); badSettings |= !convertOk; calibration->reversed = settings.value(revTpl.arg(axis), false).toBool(); diff --git a/src/VehicleSetup/JoystickConfigController.cc b/src/VehicleSetup/JoystickConfigController.cc index 41dc552dd2db403cba8636176647cdb963dbe610..cec3c9b8373b0f185f793361ae615da17c9598be 100644 --- a/src/VehicleSetup/JoystickConfigController.cc +++ b/src/VehicleSetup/JoystickConfigController.cc @@ -32,9 +32,9 @@ QGC_LOGGING_CATEGORY(JoystickConfigControllerLog, "JoystickConfigControllerLog") const int JoystickConfigController::_updateInterval = 150; ///< Interval for timer which updates radio channel widgets const int JoystickConfigController::_calCenterPoint = 0; const int JoystickConfigController::_calValidMinValue = -32768; ///< Largest valid minimum axis value -const int JoystickConfigController::_calValidMaxValue = 32768; ///< Smallest valid maximum axis value +const int JoystickConfigController::_calValidMaxValue = 32767; ///< Smallest valid maximum axis value const int JoystickConfigController::_calDefaultMinValue = -32768; ///< Default value for Min if not set -const int JoystickConfigController::_calDefaultMaxValue = 32768; ///< Default value for Max if not set +const int JoystickConfigController::_calDefaultMaxValue = 32767; ///< Default value for Max if not set const int JoystickConfigController::_calRoughCenterDelta = 500; ///< Delta around center point which is considered to be roughly centered const int JoystickConfigController::_calMoveDelta = 32768/2; ///< Amount of delta past center which is considered stick movement const int JoystickConfigController::_calSettleDelta = 100; ///< Amount of delta which is considered no stick movement diff --git a/src/VehicleSetup/SetupView.qml b/src/VehicleSetup/SetupView.qml index f895818eab2b3ea6360d15a7accdb94779ed77ab..61402000bdda344ab94beb68e2ec20a361405c87 100644 --- a/src/VehicleSetup/SetupView.qml +++ b/src/VehicleSetup/SetupView.qml @@ -153,76 +153,85 @@ Rectangle { } } - Column { - id: buttonColumn - width: buttonWidth - - SubMenuButton { - id: summaryButton - width: buttonWidth - imageResource: "/qmlimages/VehicleSummaryIcon.png" - setupIndicator: false - exclusiveGroup: setupButtonGroup - text: "SUMMARY" - - onClicked: showSummaryPanel() - } - - SubMenuButton { - id: firmwareButton - width: buttonWidth - imageResource: "/qmlimages/FirmwareUpgradeIcon.png" - setupIndicator: false - exclusiveGroup: setupButtonGroup - visible: !ScreenTools.isMobile - text: "FIRMWARE" + Flickable { + id: buttonFlickable + width: buttonWidth + height: parent.height + contentWidth: buttonWidth + contentHeight: buttonColumn.height + flickableDirection: Flickable.VerticalFlick + + Column { + id: buttonColumn + width: buttonWidth - onClicked: showFirmwarePanel() - } + SubMenuButton { + id: summaryButton + width: buttonWidth + imageResource: "/qmlimages/VehicleSummaryIcon.png" + setupIndicator: false + exclusiveGroup: setupButtonGroup + text: "SUMMARY" - SubMenuButton { - id: joystickButton - width: buttonWidth - setupIndicator: true - setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false - exclusiveGroup: setupButtonGroup - visible: multiVehicleManager.parameterReadyVehicleAvailable && joystickManager.joysticks.length != 0 - text: "JOYSTICK" + onClicked: showSummaryPanel() + } - onClicked: showJoystickPanel() - } + SubMenuButton { + id: firmwareButton + width: buttonWidth + imageResource: "/qmlimages/FirmwareUpgradeIcon.png" + setupIndicator: false + exclusiveGroup: setupButtonGroup + visible: !ScreenTools.isMobile + text: "FIRMWARE" - Repeater { - model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0 + onClicked: showFirmwarePanel() + } SubMenuButton { + id: joystickButton width: buttonWidth - imageResource: modelData.iconResource - setupIndicator: modelData.requiresSetup - setupComplete: modelData.setupComplete + setupIndicator: true + setupComplete: joystickManager.activeJoystick ? joystickManager.activeJoystick.calibrated : false exclusiveGroup: setupButtonGroup - text: modelData.name.toUpperCase() + visible: multiVehicleManager.parameterReadyVehicleAvailable && joystickManager.joysticks.length != 0 + text: "JOYSTICK" - onClicked: showVehicleComponentPanel(modelData) + onClicked: showJoystickPanel() } - } - SubMenuButton { - width: buttonWidth - setupIndicator: false - exclusiveGroup: setupButtonGroup - visible: multiVehicleManager.parameterReadyVehicleAvailable - text: "PARAMETERS" + Repeater { + model: multiVehicleManager.parameterReadyVehicleAvailable ? multiVehicleManager.activeVehicle.autopilot.vehicleComponents : 0 - onClicked: showParametersPanel() - } - } // Column + SubMenuButton { + width: buttonWidth + imageResource: modelData.iconResource + setupIndicator: modelData.requiresSetup + setupComplete: modelData.setupComplete + exclusiveGroup: setupButtonGroup + text: modelData.name.toUpperCase() + + onClicked: showVehicleComponentPanel(modelData) + } + } + + SubMenuButton { + width: buttonWidth + setupIndicator: false + exclusiveGroup: setupButtonGroup + visible: multiVehicleManager.parameterReadyVehicleAvailable + text: "PARAMETERS" + + onClicked: showParametersPanel() + } + } // Column + } // Flickable Loader { id: panelLoader anchors.leftMargin: defaultTextWidth anchors.rightMargin: defaultTextWidth - anchors.left: buttonColumn.right + anchors.left: buttonFlickable.right anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom