Mobile-SDK-Android
Mobile-SDK-Android copied to clipboard
The aircraft is rotated forever when using AircraftYawAction
I am using this function to rotate drone an angle as required.
List<TimelineElement> elements = new ArrayList<>();
float angle = 30;
float velocity = 10;
AircraftYawAction aircraftYawAction = new AircraftYawAction(angle, velocity);
elements.add(aircraftYawAction);
MissionControl missionControl = MissionControl.getInstance();
if (missionControl.scheduledCount() > 0) {
missionControl.unscheduleEverything();
missionControl.removeAllListeners();
}
missionControl.scheduleElements(elements);
missionControl.addListener(listener);
The angle will be from -180 to 180 degrees.
Sometimes there are 2 errors:
- drone rotate incorrectly. For example: I enter a value of 30, sometimes the drone will rotate 27 or 33 degrees.
- drone will rotate on the air forever, the state of the event is "STARTED"
DJI Android SDK: 4.8.1 DJI Product: P3P Android system version: 7.1.1 Android device: Sky a900 Android Studio version: 3.2.1
Please report your issue to [email protected], as it's our official channel for developers to request DJI SDK support now.