大疆社区

标题: MSDK 航线动作2.0开发,变焦问题 [打印本页]

作者: djiuser_Jp9BDtd    时间: 2021-6-24
标题: MSDK 航线动作2.0开发,变焦问题
本帖最后由 djiuser_Jp9BDtdGfzKO 于 2021-6-24 11:27 编辑

使用4.14.1的版本开发。 航线动作增加变焦功能,代码片段如下:   其他的航线动作上传都没问题,增加变焦动作后 上传航线动作一直无法成功,在sample code设置航线动作中并没有找到变焦的航线动作。我在MSDK网页上的   WaypointCameraActuatorParam中,也并没有找到setZoomParam这个方法。是相机变焦没有开放吗?还是因为其他原因呢?
如果有大哥写过相机变焦航线动作2.0的版本,帮忙看一下这是什么问题,万分感谢



1624505220200.072.png (38.48 KB, 下载次数: 31)

1624505220200.072.png

作者: zhyang18    时间: 2021-6-25
是不是少设置了一个参数:setCameraOperationType(ActionTypes.CameraOperationType.ZOOM)

WaypointActuator waypointActionActuatorStartVideo = new WaypointActuator.Builder()
                                    .setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
                                    .setCameraActuatorParam(new WaypointCameraActuatorParam.Builder()
                                            .setCameraOperationType(ActionTypes.CameraOperationType.ZOOM)
                                            .setZoomParam(new WaypointCameraZoomParam.Builder()
                                                    .setFocalLength((int)zoom).build())
                                            .build())
                                    .build();
作者: djiuser_Jp9BDtd    时间: 2021-6-25
zhyang186-25 13:44
是不是少设置了一个参数:setCameraOperationType(ActionTypes.CameraOperationType.ZOOM)

WaypointActuator waypointActionActuatorStartVideo = new WaypointActuator.Builder()
                                    .setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
                                    .setCameraActuatorParam(new WaypointCameraActuatorParam.Builder()
                                            .setCameraOperationType(ActionTypes.CameraOperationType.ZOOM)
                                            .setZoomParam(new WaypointCameraZoomParam.Builder()
                                                    .setFocalLength((int)zoom).build())
                                            .build())
                                    .build();
哦哦,是的 谢谢。麻烦我再问一下,航线2.0动作添加飞机航向角的旋转。我这边做的是加一个飞机转动航向角90度,再添加一个动作将飞机转动航向角-90度,单个测试飞机转向正常,当在飞机转动航向角90和将飞机转动航向角-90度的动作之间添加一个比如拍照的动作后.执行过程如下:飞机转动航向角90 拍照 飞机转动航向角-90度.可是在后面飞机又自己转动航向角90度,我只添加了三个动作 可是飞机做了四个动作 ,经过多次测试后,一直找不到问题,麻烦问您一下,您之前测试有没有遇到同样的问题




欢迎光临 大疆社区 (https://bbs.dji.com/) Powered by Discuz! X3.2