SunAndSnow24
lvl.2
United States
Offline
|
Hello all,
I'm trying to develop a Android app using the mobile SDK for my Mavic Air.
I have compiled and loaded the Android-GSDemo-GoogleMap app from github, as well as developed my own test app.
I get the "waypoint count is invalid" error from both apps. If anyone has any insight or suggestions, I would love to hear them.
Every time call the "loadmission()" method, I get the "waypoint count is invalid" error:
List<Waypoint> waypointList = new ArrayList<>();
dji.common.mission.waypoint.Waypoint mWaypoint = new Waypoint(45.466857, 81.798170, 10);
waypointList.add(mWaypoint);
//Add Waypoints to Waypoint arraylist;
if (waypointMissionBuilder == null) {
waypointMissionBuilder = new WaypointMission.Builder();
}
waypointMissionBuilder.finishedAction(mFinishedAction)
.maxFlightSpeed(mSpeed)
.autoFlightSpeed(mSpeed)
.headingMode(mHeadingMode)
.flightPathMode(WaypointMissionFlightPathMode.NORMAL)
.gotoFirstWaypointMode(WaypointMissionGotoWaypointMode.SAFELY)
.setExitMissionOnRCSignalLostEnabled(true)
.setGimbalPitchRotationEnabled(true)
.repeatTimes(1)
.setMissionID(1)
.waypointList(waypointList).waypointCount(waypointList.size());
DJIError error = DJISDKManager.getInstance().getMissionControl().getWaypointMissionOperator().loadMission(waypointMissionBuilder.build());
Thank you!
|
|