diff --git a/custom-example/res/CustomCameraControl.qml b/custom-example/res/CustomCameraControl.qml index 5e47f696e7d5817d8c32cb90df064746f4cc412f..c096339b4ea46abcb1f0a6b902687cd7bb9c94c2 100644 --- a/custom-example/res/CustomCameraControl.qml +++ b/custom-example/res/CustomCameraControl.qml @@ -85,7 +85,7 @@ Item { //--------------------------------------------------------------------- //-- Quick Thermal Modes Item { - id: backgroundRect + id: thermalBackgroundRect width: buttonsRow.width + (ScreenTools.defaultFontPixelWidth * 4) height: buttonsRow.height + (ScreenTools.defaultFontPixelHeight) visible: _irPaletteFact && (QGroundControl.videoManager.hasThermal || _camera.vendor === "NextVision") @@ -143,14 +143,12 @@ Item { // Thermal palette options CustomQuickButton { checkable: false - enabled: thermalFull.checked || thermalPip.checked width: buttonSize height: buttonSize + visible: _irPaletteFact iconSource: "/custom/img/thermal-palette.svg" onClicked: { - if(_irPaletteFact) { - thermalPalettes.open() - } + thermalPalettes.open() } } } @@ -466,7 +464,7 @@ Item { visible: _hasZoom mainColor: qgcPal.window contentColor: qgcPal.text - fontPointSize: ScreenTools.defaultFontPointSize * 1.25 + fontPointSize: ScreenTools.defaultFontPointSize * 1.75 zoomLevelVisible: false zoomLevel: _hasZoom ? _camera.zoomLevel : NaN anchors.horizontalCenter: parent.horizontalCenter @@ -942,7 +940,7 @@ Item { id: thermalPalettes width: Math.min(mainWindow.width * 0.666, ScreenTools.defaultFontPixelWidth * 40) height: mainWindow.height * 0.5 - modal: true + //modal: true focus: true parent: Overlay.overlay x: Math.round((mainWindow.width - width) * 0.5) @@ -986,6 +984,12 @@ Item { checked: index === _irPaletteFact.value onClicked: { _irPaletteFact.value = index + if(thermalBackgroundRect.visible) { + if(_camera.thermalMode !== QGCCameraControl.THERMAL_PIP && _camera.thermalMode !== QGCCameraControl.THERMAL_FULL) { + _camera.thermalMode = QGCCameraControl.THERMAL_FULL + } + } + thermalPalettes.close() } } diff --git a/custom-example/res/CustomFlyView.qml b/custom-example/res/CustomFlyView.qml index a54140afd964725be5714cb8b6ccbb850bf6e706..c7e8f010a0568fab5d882fa6ca12f0dcfe29a32d 100644 --- a/custom-example/res/CustomFlyView.qml +++ b/custom-example/res/CustomFlyView.qml @@ -563,8 +563,11 @@ Item { //console.info("error: " + pitch_angle_error + "; angle_state: " + pitch_angle) pitch = pitch_setpoint yaw += stick.xAxis * gimbalControl.speedMultiplier + yaw = clamp(yaw, -180, 180) - pitch = clamp(pitch, -45, 45) + pitch = clamp(pitch, -90, 45) + pitch_angle = clamp(pitch_angle, -90, 45) + //console.info("P: " + pitch + "; Y: " + yaw) activeVehicle.gimbalControlValue(pitch, yaw); gimbalControl._currentYaw = yaw @@ -572,7 +575,7 @@ Item { gimbalControl.time_last_seconds = time_current_seconds } else { yaw += stick.xAxis * gimbalControl.speedMultiplier - var hackedYaw = yaw + (stick.xAxis * gimbalControl.speedMultiplier * 25) + var hackedYaw = yaw + (stick.xAxis * gimbalControl.speedMultiplier * 50) pitch += pitch_stick * gimbalControl.speedMultiplier hackedYaw = clamp(hackedYaw, -180, 180) yaw = clamp(yaw, -180, 180)