qgroundcontrol
qgroundcontrol copied to clipboard
Continuous zoom sometimes fails to send stop (value = 0) and camera keeps zooming
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
- Map joystick buttons for Continuous Zoom In and Continuous Zoom Out in the Joystick settings.
- Start QGroundControl v5 Stable (tested on Ubuntu 22 and Ubuntu 24 Docker).
- Hold the zoom-in or zoom-out button to begin continuous zoom.
- Release the button.
- Observe via Wireshark or MAVLink Inspector:
- Expected: MAV_CMD_SET_CAMERA_ZOOM (param = 0) on release
- 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
} 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.