psdk3.8订阅GPS_POSITION
Completedpsdk3.8中用回调的方式订阅GPS_POSITION无法获取结果
DjiFcSubscription_SubscribeTopic(DJI_FC_SUBSCRIPTION_TOPIC_GPS_POSITION,DJI_DATA_SUBSCRIPTION_TOPIC_1_HZ,GpsPositionCallback);
static T_DjiReturnCode GpsPositionCallback(
const uint8_t *data, uint16_t dataSize,
const T_DjiDataTimestamp *timestamp) {
T_DjiFcSubscriptionGpsPosition *gpsPosition =
(T_DjiFcSubscriptionGpsPosition *)data;
printf("gps:%d,%d,%d\n", gpsPosition->x, gpsPosition->y, gpsPosition->z);
return DJI_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
Please sign in to leave a comment.
Comments
3 comments