dp7102
lvl.2
Israel
Offline
|
Hi,
I would like to use DJIDiagnostics class in IOS MSDK to get indication of the drone hardware issues.
As I understand, I can observe DJIDiagnostics instance value changes using KVO.
So I create diagnostic object using:
let djiDiagnistics = DJIDiagnostics()
I observe values change with code like this:
kvoTokenComponent = djiDiagnistics.observe(\.component, options: .new) { (djiDiagnistics, change) in
guard let component = change.newValue else { return }
print("New component: \(component)")
}
My questions:
1. djiDiagnistics members are zero during all lifetime of the variable (even when I disconnect it from simulator or turn drone off). Do I create/use DJIDiagnostics in a wrong way?
2. Do i do observation process correctly?
I didn't find any examples or information regarding DJIDiagnostics class use. If there is such example, could you please provide me a link.
Thanks!
|
|