qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

Continuous zoom sometimes fails to send stop (value = 0) and camera keeps zooming

Open Niki-dev12 opened this issue 4 months ago • 1 comments

Have you checked the latest release for fixes?

  • [x] Yes, I’ve tested on the latest release

Description

Expected Behavior When performing continuous zoom (zoom in or out) using joystick buttons, QGroundControl should:

  • Send a MAV_CMD_SET_CAMERA_ZOOM command with a value 1 while the button is held.
  • Immediately send the same command with value = 0 when the button is released.

Current Behavior

From time to time, when releasing the zoom button, QGC does not send the stop (value = 0) command. Instead, it transmits another non-zero zoom value (for example 56 / 100). As a result, the camera continues zooming indefinitely until another zoom command is issued.

Steps To Reproduce

  1. Map joystick buttons for Continuous Zoom In and Continuous Zoom Out in the Joystick settings.
  2. Start QGroundControl v5 Stable (tested on Ubuntu 22 and Ubuntu 24 Docker).
  3. Hold the zoom-in or zoom-out button to begin continuous zoom.
  4. Release the button.
  5. Observe via Wireshark or MAVLink Inspector:
    • Expected: MAV_CMD_SET_CAMERA_ZOOM (param = 0) on release
Image
-   Actual: sometimes a non-zero value such as 56 is sent.

Additional Details

  • Happens intermittently, more often after multiple zoom cycles or when switching rapidly between zoom-in and zoom-out.
  • Behavior suggests stopContinuousZoom() is occasionally skipped or the cached zoom value is reused.
  • Wireshark confirms non-zero zoom parameter on release.

System Information

QGC Version: Stable_V5.0 QGC Build: localy in docker Operating System: Ubuntu 20 (native) and Ubuntu 24 (Docker) Joystick: Jumper T20

Log Files and Screenshots

No response

Niki-dev12 avatar Oct 27 '25 15:10 Niki-dev12

    } else if ((action == _buttonActionContinuousZoomIn) || (action == _buttonActionContinuousZoomOut)) {
        if (buttonDown) {
            emit startContinuousZoom((action == _buttonActionContinuousZoomIn) ? 1 : -1);
        } else {
            emit stopContinuousZoom();
        }
    } else if ((action == _buttonActionStepZoomIn) || (action == _buttonActionStepZoomOut)) {

At first glance doesn't smell right.

DonLakeFlyer avatar Oct 27 '25 20:10 DonLakeFlyer