[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[dji8-ios] B1 Aircraft

" Accessing the Aircraft "
| product |
product := DJISDKManager product.
product isNil ifTrue: [ ^self abortPage ].
(product isKindOf: DJIAircraft) ifFalse: [
  self print: '// Not an aircraft!!'.
  ^self abortPage
].
self print: 'Found product ' ,product model.


" Accessing Aircraft properties "
| value |
value := DJISDKManager product.
(value class selectors
  select: [:each| (each startsWith: #is) and: [each argumentCount = 0] ])
  ,#(flightController allBatteries remoteController mobileRemoteController)
  do: [:msg| self print: ' ',msg,'=',(value perform: msg) ].