首页
教程
无人机教程
手持教程
后期教程
作品
航拍无人机
DJI Mavic
DJI Avata
DJI Mini
DJI FPV
DJI Air
Phantom
Inspire
其他
手持摄影
创意摄影
DJI Mic
Osmo Action
Osmo Mobile
Osmo Pocket
Ronin
商用产品
行业应用
教育应用
农业应用
咨询
官方公告
售后服务
查禁飞区
其他
活动
官方活动
城市摄影大赛
大疆校园
同城约飞
每日签到
其他
发帖
登录
注册
wdcswd
已累计飞行 0 米
发布于
2015-8-24
浏览
3.8k
相关分类
SDK
Mobile-SDK
0
0
5
0
5 条评论
最新
最早
快来评论吧
水无痕
6
已累计飞行 14382 米
我是单独用一个变量存了index, 然后update这个变量,同时读取这个变量。 但是在takeoff函数里面将它手动初始化,因为update的过程不含初始化什么的。
2015-8-28
wdcswd
5
已累计飞行 0 米
请问你是说的update是自带的哪个callback ?还是在哪个地方将index值重新赋值。
2015-8-28
水无痕
4
已累计飞行 14382 米
是这样,飞机返回的信息没有update过就保持不变。 也就是说你飞到第三个航点,返航了,直到再次飞到下一个航点之前返回值永远是第三个航点。 我的做法是存储航点index的那个变量, 在每次takeoff的时候手动赋值成-1
2015-8-28
wdcswd
3
已累计飞行 0 米
谢谢,这个方法我也用过 ,只适合执行一次飞行任务,返航后再重复执行,index值就获取不到了。
2015-8-26
iCanFly
2
已累计飞行 0 米
如果你想获取到达航点的INDEX,建议参考官方DEMO中的这段代码(红色部分): mGroundStationExecutionPushInfoCallBack = new DJIGroundStationExecutionPushInfoCallBack() { @Override public void onResult(DJIGroundStationExecutionPushInfo info) { // TODO Auto-generated method stub StringBuffer sb = new StringBuffer(); switch(info.eventType.value()) { case EXECUTION_STATUS_UPLOAD_FINISH : { sb.append("Execution Type : " + info.eventType.toString()).append("\n"); sb.append("Validation : " + (info.isMissionValid ? "true" : "false")).append("\n"); sb.append("Estimated run time : " + info.estimateRunTime).append("\n"); break; } case EXECUTION_STATUS_FINISH : { sb.append("Execution Type : " + info.eventType.toString()).append("\n"); sb.append("Repeat : " + Integer.toString(info.isRepeat)).append("\n"); // sb.append("Reserve: " + GroundStationWayPointExecutionState.find(info.reserved).toString()).append("\n"); break; } case EXECUTION_STATUS_REACH_POINT : { sb.append("Execution Type : " + info.eventType.toString()).append("\n"); sb.append(
"WayPoint index : " + info.wayPointIndex
).append("\n"); sb.append("Current State : " + GroundStationWayPointExecutionState.find(info.currentState).toString()).append("\n"); sb.append("Reserve : " + info.reserved).append("\n"); break; } } GsInfoString1 = sb.toString(); GsProtocolDemoActivity.this.runOnUiThread(new Runnable() { @Override public void run() { // TODO Auto-generated method stub mGroundStationTextView1.setText(GsInfoString1); } }); } }; DJIDrone.getDjiGroundStation().setGroundStationExecutionPushInfoCallBack(mGroundStationExecutionPushInfoCallBack);
2015-8-25
暂无更多评论
关于作者
已累计飞行 0 米
wdcswd
飞行学员
认证设备
暂无关联认证的设备
最新帖子
更多
DJI-SDK的开发者们都去哪里了???
手机锁屏后APP连接失败
是否有监听遥控器按键和遥感的接口?