psdk3.8订阅GPS_POSITION
已完成psdk3.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;
}
请先登录再写评论。
评论
3 条评论