const classafParrotSdk2::DroneConfig

sys::Obj
  afParrotSdk2::DroneConfig

Drone config in the Common category. This contains config in the Common category. See session for other config.

DroneConfig instances may be obtained from the Drone class:

config := drone.config() 
defId

Source

const static Int defId := 0

The default ID for session, user, and application when the drone is first turned on.

drone

Source

const Drone drone

The wrapped drone.

droneName

Source

Str droneName

Name of the drone. This name may be used by video games developer to assign a default name to a player. Note this is not related to the Wi-Fi SSID name.

Corresponds to the GENERAL:ardrone_name configuration key.

dump

Source

Str dump(Bool dumpToStdOut := true)

Dumps all fields to debug string.

firmwareBuildDate

Source

DateTime firmwareBuildDate { private set }

Date of drone firmware compilation.

Corresponds to the GENERAL:soft_build_date configuration key.

hiResNavData

Source

Bool hiResNavData

Set to true to have the drone send NavData at a full 200 times a second (approx). When false (the default) NavData is sent 15 times a second (approx).

Corresponds to the GENERAL:navdata_demo configuration key.

make

Source

new make(Drone drone)

Creates a new DroneConfig instance for the given Drone. Note this class holds no state.

maxAltitude

Source

Float maxAltitude

Maximum drone altitude in meters. A typical value for unlimited altitude is 100 meters.

Corresponds to the CONTROL:altitude_max configuration key.

minAltitude

Source

Float minAltitude

Minimum drone altitude in meters. Should be left to the default value, for control stabilities issues.

Corresponds to the CONTROL:altitude_min configuration key.

minBatteryLevel

Source

Int minBatteryLevel

Minimum battery level before the drone lands automatically.

Corresponds to the GENERAL:vbat_min configuration key.

motorVersions

Source

Str:Version motorVersions(Int num)

Returns the versions of the drone's motor's hardware, software, and supplier.

versions()  // --> [hardware:6.0, software:1.43, supplier:1.1]

The motor number should be between 1 and 4.

Corresponds to the configuration keys:

  • GENERAL:motorX_hard
  • GENERAL:motorX_soft
  • GENERAL:motorX_supplier
networkPairedMac

Source

Str networkPairedMac

Mac address paired with the drone. Set to 00:00:00:00:00:00 to un-pair with the drone.

Corresponds to the NETWORK:owner_mac configuration key.

networkSsid

Source

Str networkSsid

The network SSID. Changes are applied on reboot.

Corresponds to the NETWORK:ssid_single_player configuration key.

networkWifiMode

Source

Int networkWifiMode

Mode of the Wi-Fi network. Possible values are:

0 = The drone is the access point of the network
1 = The drone creates (or join) the network in Ad-Hoc mode
2 = The drone tries to join the network as a station

Corresponds to the NETWORK:wifi_mode configuration key.

picUltrasoundFreq

Source

Int picUltrasoundFreq

Ultrasound frequency used to measure altitude. Using two different frequencies for two drones can significantly reduce the ultrasound perturbations.

7 = Ultrasound at 22.22 Hz
8 = Ultrasound at 25.00 Hz

Corresponds to the PIC:ultrasound_freq configuration key.

picVersion

Source

Version picVersion { private set }

The software version of the Nav-board.

Corresponds to the PIC:pic_version configuration key.

reset

Source

Void reset()

Resets the session, user, and application profiles back to the default id of 00000000.

sendConfig

Source

Void sendConfig(Str key, Obj val)

Sends config to the drone, using the current Session, User, and Application IDs. This method blocks until the config has been acknowledged.

serialNumber

Source

Str serialNumber { private set }

Serial number of the drone.

Corresponds to the GENERAL:drone_serial configuration key.

session

Source

DroneSessionConfig session(Str? sessionName := null)

If the done contains data for the given sessionName then it is loaded. If not, then default data for the new session is created.

If session name is null, or matches the current session, then the current session config is returned.

See DroneSessionConfig for details.

totalFlightTime

Source

Duration totalFlightTime { private set }

Time spent by the drone in a flying state in its whole lifetime.

Corresponds to the GENERAL:flying_time configuration key.

useOutdoorProfile

Source

Bool useOutdoorProfile

Sets the sensitivity profile for indoor / outdoor use. Loads values for:

  • indoor/outdoor_euler_angle_max
  • indoor/outdoor_control_vz_max
  • indoor/outdoor_control_yaw

See DroneUserConfig for details.

Note this also enables the wind estimator of the AR Drone 2.0, and thus should always be enabled when flying outside.

Corresponds to the CONTROL:outdoor configuration key.

useOutdoorShell

Source

Bool useOutdoorShell

Tells the drone it is wearing the outdoor shell so flight optimisations can be made. Deactivate this when flying with the indoor shell.

This setting is not linked with useOutdoorProfile, both have different effects on the drone.

Corresponds to the CONTROL:flight_without_shell configuration key.

versions

Source

Str:Version versions()

Returns the version of the drone's configuration subsystem, motherboard, and firmware.

versions()  // --> [config:1, firmware:2.4.8, motherboard:34]

Corresponds to the configuration keys:

  • GENERAL:num_version_config
  • GENERAL:num_version_mb
  • GENERAL:num_version_soft
videoInfo

Source

Str:Int videoInfo()

Returns read only video info. Returned keys are:

  • fps - Current FPS of the video interface. This may be different than the actual framerate.
  • bufferDepth - Buffer depth for the video interface.
  • noOfTrackers - Number of tracking points used for optical speed estimation.
  • storageSpace - Size of the wifi video record buffer.
  • fileIndex - Number of the last recorded video ( video_XXX.mp4 ) on USB key.
videoInfo()  // --> ["fps": 30, "bufferDepth": 2, "noOfTrackers": 12, "storageSpace": 20480, "fileIndex": 1]
videoOnUsb

Source

Bool videoOnUsb

If a USB key with > 100Mb of freespace is connected, the video stream will be recorded on the USB key.

In all other cases, the record stream is sent to the controlling device, which will be in charge of the actual recording.

Corresponds to the VIDEO:video_on_usb configuration key.