Drone
abstract class Drone : Instrument.Provider, Peripheral.Provider, PilotingItf.Provider
Content copied to clipboard
A generic drone. This is the base class to manage a specific drone.
Types
Model
Link copied to clipboard
Drone model.
Functions
connect
Link copied to clipboard
abstract fun connect(connector: DeviceConnector, vararg parameters: ConnectionParameter): Boolean
Content copied to clipboard
Connects the drone using the specified device connector and custom parameters.
disconnect
Link copied to clipboard
Disconnects the drone.
get Instrument
Link copied to clipboard
abstract fun <I : Instrument> getInstrument(@NonNull instrumentClass: Class<I>): I?
Content copied to clipboard
abstract fun <I : Instrument> getInstrument(@NonNull instrumentClass: Class<I>, @NonNull observer: Ref.Observer<I>): Ref<I>
Content copied to clipboard
get Peripheral
Link copied to clipboard
abstract fun <P : Peripheral> getPeripheral(@NonNull peripheralClass: Class<P>): P?
Content copied to clipboard
abstract fun <P : Peripheral> getPeripheral(@NonNull peripheralClass: Class<P>, @NonNull observer: Ref.Observer<P>): Ref<P>
Content copied to clipboard
get Piloting Itf
Link copied to clipboard
abstract fun <PI : PilotingItf> getPilotingItf(@NonNull pilotingItfClass: Class<PI>): PI?
Content copied to clipboard
abstract fun <PI : PilotingItf> getPilotingItf(@NonNull pilotingItfClass: Class<PI>, @NonNull observer: Ref.Observer<PI>): Ref<PI>
Content copied to clipboard
get State
Link copied to clipboard
abstract fun getState(observer: Ref.Observer<DeviceState>): Ref<DeviceState>
Content copied to clipboard
Gets current drone state and registers an observer notified each time it changes.