Keywords: OSDK, gimbal angle, gimbal rotation, gimbal manager
Yes, the API specifies the gimbal interface through parameters, and the reference code is as follows:
GimbalSingleData GimbalManagerSyncSample::getGimbalData(PayloadIndexType index) {
if (vehicle->isM300() && index <= PAYLOAD_INDEX_2 && index >= PAYLOAD_INDEX_0)
return vehicle->subscribe->getValue<TOPIC_THREE_GIMBAL_DATA>().gbData[index];
else if (index <= PAYLOAD_INDEX_1 && index >= PAYLOAD_INDEX_0)
return vehicle->subscribe->getValue<TOPIC_DUAL_GIMBAL_DATA>().gbData[index];
else {
GimbalSingleData data = {0};
DERROR("Invalid payload index : %d", index);
return data;
}
}
Note: This article is from Chinese and is translated by machine. If there is any suggestions, please point it out and we will correct it in time
Comments
0 comments
Please sign in to leave a comment.