You can use virtual stick function to rotate the aircraft.
- Call setYawControlMode, and set the yaw mode to ANGLE.
- Call sendVirtualStickFlightControlData to send the virtual stick command. Please be noted that the yaw angle control is a PID process. You need to call sendVirtualStickFlightControlData multiple times to rotate the aircraft to a specified angle. You can refer to the code below.
flightController.setYawControlMode(YawControlMode.ANGLE);
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
flightController.sendVirtualStickFlightControlData(new FlightControlData(0,0,yaw,0),
new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError djiError) {
}
});
}
}, 0, 100);
Comments
2 comments
If I enter a value for yaw, the drone turns without interruption. Is there a way to enter an undercut or to time the signal?
Thx and best regards
And is there a way to set multiple values like from a list or an array?
Please sign in to leave a comment.