Browse Source

Camera: allow camera managed by an autopilot

By querying autopilot for the CAMERA_INFORMATION message, we allow an
autopilot to be a proxy for a MAVLink or non-MAVLink camera.

The idea is similar to a gimbal manager implemented by an autopilot.
QGC4.4
Julian Oes 9 months ago
parent
commit
f20f05e87c
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 3
      src/Camera/QGCCameraManager.cc

3
src/Camera/QGCCameraManager.cc

@ -69,7 +69,8 @@ void
QGCCameraManager::_mavlinkMessageReceived(const mavlink_message_t& message) QGCCameraManager::_mavlinkMessageReceived(const mavlink_message_t& message)
{ {
//-- Only pay attention to camera components, as identified by their compId //-- Only pay attention to camera components, as identified by their compId
if(message.sysid == _vehicle->id() && (message.compid >= MAV_COMP_ID_CAMERA && message.compid <= MAV_COMP_ID_CAMERA6)) { if(message.sysid == _vehicle->id() && (message.compid == MAV_COMP_ID_AUTOPILOT1 ||
(message.compid >= MAV_COMP_ID_CAMERA && message.compid <= MAV_COMP_ID_CAMERA6))) {
switch (message.msgid) { switch (message.msgid) {
case MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS: case MAVLINK_MSG_ID_CAMERA_CAPTURE_STATUS:
_handleCaptureStatus(message); _handleCaptureStatus(message);

Loading…
Cancel
Save