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

test[dji8-ios] C1 Handheld

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


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