2

I am using DJI sample code to run a timeline mission.

The first time I run the mission it runs fine. However the second time I get a DJIMissionControlTimelineEventStartError - Navigation mode not open when a GoToAction is executed. This element is second in the list after TakeOffAction.

So I cannot run consecutive missions without restarting the app.

I cannot find any detail in the docs or online anywhere. How can I get the Timeline controller back to a good state after this happens?

    - (IBAction)onStartButtonClicked:(id)sender
    {
        [[DJISDKManager missionControl] addListener:self
                        toTimelineProgressWithBlock:^(DJIMissionControlTimelineEvent event, id<DJIMissionControlTimelineElement>  _Nullable element, NSError * _Nullable error, id  _Nullable info)
        {
            if (error) {
                NSLog(@"ERROR: %@", error.localizedDescription);
            }
            if (error) {
                [[DJISDKManager missionControl] stopTimeline];
                [[DJISDKManager missionControl] unscheduleEverything];
            }
        }];
        [[DJISDKManager missionControl] startTimeline];
    }

    - (IBAction)onStopButtonClicked:(id)sender
    {
        [[DJISDKManager missionControl] stopTimeline];
        [[DJISDKManager missionControl] unscheduleEverything];
        [[DJISDKManager missionControl] removeListener:self];
    }

Timeline Elements I have scheduled

  • TakeOffAction
  • GoToAction
  • GimbalAttitudeAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • GimbalAttitudeAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • repeated to get 3 rows of photos at different gimbal pitches...
Brien Crean
  • 2,599
  • 5
  • 21
  • 46

1 Answers1

1

My experience from timeline mission is that it's crap.

You can do the same by yourselt. Just call the different functions in a state machine. Then you can debug them as well :-)

Timeline -mission is never uploaded to the drone, it runs on the phone, just as you would do it in your own code.

Mats Bohlinsson
  • 176
  • 2
  • 5
  • Thanks for the suggestion, that's an interesting approach! Have you found it to be reliable that way? – Brien Crean Mar 18 '21 at 16:49
  • It was long ago. I think it was a problem when uploading waypointsmissions. Sometimes the upload fails, and you have to do it again. That didn't work with timeline. – Mats Bohlinsson Mar 18 '21 at 19:00