Hi,
I'm trying to program the M300 with Zenmuse H20 with Waypoint V2 so that it takes photos each 3 seconds between two waypoints.
(I'm working on the iOS Mobile SDK version 4.14-trial2).
I've tried the following code and sometimes it works, some other times it doesn't work :
- when it works it takes photos approximately every 3 seconds (from 2 to 4 seconds)
- when it does not work it takes a picture at the start and the two waypoints and nothing in between.
Here is the code I'm using :
// create a take photo each 3 seconds action let ap = DJIWaypointV2Action.init() ap.actionId = 9999 // set an unique id // create the trigger let aptrigger = DJIWaypointV2Trigger.init() aptrigger.actionTriggerType = .interval // interval trigger // param of the trigger let p = DJIWaypointV2IntervalTriggerParam.init() p.actionIntervalType = .time // based on time p.interval = 3 // each 3 seconds p.startIndex = 0 // starting on the first waypoint aptrigger.intervalTriggerParam = p // set the param ap.trigger = aptrigger // set the trigger // create the actuator let apactuator = DJIWaypointV2Actuator.init() apactuator.actuatorIndex = 0 // index of camera apactuator.type = .camera // camera actuator (we want to take pictures) let p2 = DJIWaypointV2CameraActuatorParam.init() p2.operationType = .takePhoto // take photo as action apactuator.cameraActuatorParam = p2 // set the param ap.actuator = apactuator // set the actuator
Any idea what can cause this kind of problem?
Some complementary infos that can matter :
- The waypoints path can be only altitude but since I'm using a time interval type it shouldn't matter
- The path between two waypoints takes approx 10s so I should have at least 3 photos
- I picked 3seconds since the limit for JPEG is 2s, I'm supposed to be large
- The Zenmuse H20 is taking pictures with its two lenses.
Thanks for your help!
|