Skip to content

Commit

Permalink
Merge pull request dji-sdk#444 from DJI-Colin/match_wp2_CameraActuato…
Browse files Browse the repository at this point in the history
…rFocusParam

Match wp2 camera actuator focus param
  • Loading branch information
DJI-Jerry authored Jan 14, 2021
2 parents fce5ac0 + e42dee7 commit a4b4853
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 6 additions & 4 deletions msg/WaypointV2CameraActuatorFocusParam.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
# out area if the focus assistant is enabled for the manual mode.
# The range for x and y is from 0.0 to 1.0. The point [0.0, 0.0] represents the top-left angle of the screen.

uint16 x # x axis focus point value.range: [0,10000]
uint16 y # y axis focus point value.range: [0,10000]
uint8 retryTimes = 1
uint8 focusDelayTime = 0
float32 x # x axis focus point value.range: [0,1]
float32 y # y axis focus point value.range: [0,1]
uint8 regionType #focus type:0:point focus,1:rectangle focus
float32 width #Normalized focus area width(0,1)
float32 height # Normalized focus area height(0,1)
uint8 retryTimes = 1
4 changes: 2 additions & 2 deletions msg/WaypointV2GimbalActuatorRotationParam.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
int16 x # gimbal roll angle, unit: 0.1 deg,range:[-200, 200]*/
int16 y # gimbal pitch angle, unit: 0.1 deg,range:[-1300, 1300]*/
int16 x # gimbal roll angle, unit: 0.1 deg,range:[-3600, 3600]*/
int16 y # gimbal pitch angle, unit: 0.1 deg,range:[-3600, 3600]*/
int16 z # gimbal yaw angle, unit: 0.1 deg,range:[-3600, 3600]*/
uint8 ctrl_mode # 0: absolute position control, 1:relative position control*/
uint8 rollCmdIgnore # 0: roll command normal, 1: roll command ignore*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,10 @@ bool VehicleNode::waypointV2GenerateActionsCallback(
DJI::OSDK::DJIWaypointV2CameraFocusParam focusParam;
focusParam.focusTarget.x = request.actions[i].waypointV2CameraActuator.focusParam.x;
focusParam.focusTarget.y = request.actions[i].waypointV2CameraActuator.focusParam.y;
focusParam.regionType = request.actions[i].waypointV2CameraActuator.focusParam.regionType;
focusParam.width = request.actions[i].waypointV2CameraActuator.focusParam.width;
focusParam.height = request.actions[i].waypointV2CameraActuator.focusParam.height;
focusParam.retryTimes = request.actions[i].waypointV2CameraActuator.focusParam.retryTimes;
focusParam.focusDelayTime = request.actions[i].waypointV2CameraActuator.focusParam.focusDelayTime;
cameraActuatorParam = new DJI::OSDK::DJIWaypointV2CameraActuatorParam(DJI::OSDK::DJIWaypointV2ActionActuatorCameraOperationTypeFocus, &focusParam);
}
else if(request.actions[i].waypointV2CameraActuator.DJIWaypointV2ActionActuatorCameraOperationType ==
Expand Down

0 comments on commit a4b4853

Please sign in to comment.