Skip to content

Commit

Permalink
CameraProtocol: ack not needed for most requests
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 authored and meee1 committed Feb 3, 2025
1 parent a53d4a3 commit 9c2d2ff
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ExtLibs/ArduPilot/Mavlink/CameraProtocol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ private async Task RequestCameraInformationAsync()
await parent.parent.doCommandAsync(
parent.sysid, parent.compid,
MAVLink.MAV_CMD.REQUEST_CAMERA_INFORMATION,
0, 0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0, 0,
false // Don't wait for response
);
}

Expand All @@ -150,7 +151,8 @@ await parent.parent.doCommandAsync(
parent.sysid, parent.compid,
MAVLink.MAV_CMD.REQUEST_MESSAGE,
(float)MAVLink.MAVLINK_MSG_ID.VIDEO_STREAM_INFORMATION,
0, 0, 0, 0, 0, 0
0, 0, 0, 0, 0, 0,
false // Don't wait for response
);
}
}
Expand Down Expand Up @@ -207,10 +209,7 @@ public void RequestMessageIntervals(int ratehz)

float interval_us = (float)(1e6 / ratehz);

if (!have_camera_information)
{
Task.Run(RequestCameraInformationAsync);
}
Task.Run(RequestCameraInformationAsync);

// Request FOV status
Task.Run(async () =>
Expand All @@ -220,7 +219,8 @@ await parent.parent.doCommandAsync(
MAVLink.MAV_CMD.SET_MESSAGE_INTERVAL,
(float)MAVLink.MAVLINK_MSG_ID.CAMERA_FOV_STATUS,
interval_us,
0, 0, 0, 0, 0
0, 0, 0, 0, 0,
false // Don't wait for response
).ConfigureAwait(false);
});

Expand All @@ -234,7 +234,8 @@ await parent.parent.doCommandAsync(
MAVLink.MAV_CMD.SET_MESSAGE_INTERVAL,
(float)MAVLink.MAVLINK_MSG_ID.CAMERA_SETTINGS,
interval_us,
0, 0, 0, 0, 0
0, 0, 0, 0, 0,
false // Don't wait for response
).ConfigureAwait(false);
});
}
Expand All @@ -251,7 +252,8 @@ await parent.parent.doCommandAsync(
MAVLink.MAV_CMD.SET_MESSAGE_INTERVAL,
(float)MAVLink.MAVLINK_MSG_ID.CAMERA_CAPTURE_STATUS,
interval_us,
0, 0, 0, 0, 0
0, 0, 0, 0, 0,
false // Don't wait for response
).ConfigureAwait(false);
});
}
Expand Down

0 comments on commit 9c2d2ff

Please sign in to comment.