Please select Into the mobile phone version | Continue to access the computer ver.
Camera States
399 1 2020-7-17
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_d9gtAvUNsatq
lvl.2
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
}
2020-7-17
Use props
想养一条边牧
lvl.3
Flight distance : 1155 ft
Hong Kong
Offline

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

Credit Rules