Please select Into the mobile phone version | Continue to access the computer ver.
Camera States
86 1 7-17 09:14
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_d9gtAvUNsatq
lvl.1
Canada
Offline

Hi there,
I'm quite new to swift and the DJI SDK so i was wondering how to utilize data sent from the camera's sate updates. Currently what I have is this:

func camera(_ camera: DJICamera, didUpdate systemState: DJICameraSystemState) {

        cameraState = systemState
}

Essentially what I'm doing is every time a state update is recieved and the delegate method is called, I'm copying the ref value into another variable outside the main view controller. Is there a better way to do this?

BTW, similarly, I'm doing the same thing for flight controller state updates:

func flightController(_ fc: DJIFlightControlle, didUpdate state: DJIFlightControllerState) {
          stateController = state
}
7-17 09:14
Use props
想养一条边牧
lvl.2
Flight distance : 1155 ft
South Africa
Offline

I think you are right and it is the only way to do it.
7-20 18:18
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules