Mavic Air Android "waypoint count is invalid"
2143 2 2020-7-9
Uploading and Loding Picture ...(0/1)
o(^-^)o
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!
2020-7-9
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

Hey there - you need to add more than one waypoint
2020-7-9
Use props
SunAndSnow24
lvl.2
United States
Offline

DJI_Lisa Posted at 7-9 13:25
Hey there - you need to add more than one waypoint

That did the trick, thank you!
2020-7-10
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules