com.sensorcon.sensordrone.java
Class Drone

java.lang.Object
  extended by com.sensorcon.sensordrone.CoreDrone
      extended by com.sensorcon.sensordrone.java.Drone

public class Drone
extends CoreDrone

The Drone class allows you to control a Sensordrone and interact with the on-board sensors via Java

See Also:
CoreDrone

Field Summary
 
Fields inherited from class com.sensorcon.sensordrone.CoreDrone
adcStatus, altitude_Feet, altitude_Meters, altitudeStatus, apiLibraryVersion, batteryVoltage_Volts, capacitance_femtoFarad, capacitanceStatus, DEBUG, deConnected, deDisconnected, externalADC, externalADC_Volts, firmwareRevision, firmwareVersion, hardwareVersion, humidity_Percent, humidityStatus, irTemperature_Celsius, irTemperature_Fahrenheit, irTemperature_Kelvin, irTemperatureStatus, isCharging, isConnected, lastMAC, oxidizingGas_Ohm, oxidizingGasStatus, precisionGas_ppmCarbonMonoxide, precisionGasStatus, pressure_Atmospheres, pressure_Pascals, pressure_Torr, pressureStatus, QS_TYPE_ADC, QS_TYPE_ALTITUDE, QS_TYPE_CAPACITANCE, QS_TYPE_HUMIDITY, QS_TYPE_IR_TEMPERATURE, QS_TYPE_OXIDIZING_GAS, QS_TYPE_PRECISION_GAS, QS_TYPE_PRESSURE, QS_TYPE_REDUCING_GAS, QS_TYPE_RGBC, QS_TYPE_TEMPERATURE, reducingGas_Ohm, reducingGasStatus, rgbcBlueChannel, rgbcClearChannel, rgbcColorTemperature, rgbcGreenChannel, rgbcLux, rgbcRedChannel, rgbcStatus, temperature_Celsius, temperature_Fahrenheit, temperature_Kelvin, temperatureStatus, uartInputStream, uartReadBuffer, usbUartInputStream, usbUartReadBuffer
 
Constructor Summary
Drone()
           
 
Method Summary
 boolean btConnect(java.lang.String MAC)
          Connect to a Sensordrone via Bluetooth.
 boolean disconnect()
          Disconnect from a Sensordrone.
 void disconnectNow()
          Disconnects from the Sensordrone (run from the thread the method was called in).
 
Methods inherited from class com.sensorcon.sensordrone.CoreDrone
checkIfCharging, customEventNotify, customStatusNotifty, disableADC, disableAltitude, disableCapacitance, disableHumidity, disableIRTemperature, disableOxidizingGas, disablePrecisionGas, disablePressure, disableReducingGas, disableRGBC, disableTemperature, enableADC, enableAltitude, enableCapacitance, enableHumidity, enableIRTemperature, enableOxidizingGas, enablePrecisionGas, enablePressure, enableReducingGas, enableRGBC, enableTemperature, measureAltitude, measureBatteryVoltage, measureCapacitance, measureExternalADC, measureHumidity, measureIRTemperature, measureOxidizingGas, measurePrecisionGas, measurePressure, measureReducingGas, measureRGBC, measureTemperature, quickDisable, quickEnable, quickMeasure, quickStatus, registerDroneEventListener, registerDroneListener, registerDroneStatusListener, setBaudRate_115200, setBaudRate_19200, setBaudRate_2400, setBaudRate_38400, setBaudRate_9600, setLEDs, setLeftLED, setRightLED, statusOfADC, statusOfAltitude, statusOfCapacitance, statusOfHumidity, statusOfIRTemperature, statusOfOxidizingGas, statusOfPrecisionGas, statusOfPressure, statusOfReducingGas, statusOfRGBC, statusOfTemperature, uartRead, uartWrite, unregisterDroneEventListener, unregisterDroneListener, unregisterDroneStatusListener, usbUartRead, usbUartWrite
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Drone

public Drone()
Method Detail

btConnect

public boolean btConnect(java.lang.String MAC)
Connect to a Sensordrone via Bluetooth.

Parameters:
MAC - The MAC address of the Sensordrone to connect to.
Returns:
Returns true upon successful connection; false otherwise.
Since:
1.2.0

disconnect

public boolean disconnect()
Disconnect from a Sensordrone.

Returns:
Returns true upon successful disconnection.
Since:
1.2.0

disconnectNow

public void disconnectNow()
Disconnects from the Sensordrone (run from the thread the method was called in). Useful if the job queue is overloaded, not responding, etc... This is mainly used as a "force" disconnect, as it will cause a race condition between disconnecting and any jobs are in the queue. If you have ever disconnected from the Sensordrone Control app, and wondered why the LED lights were still on --- this is why.