const classafParrotSdk2::DroneSessionConfig
sys::Obj afParrotSdk2::DroneSessionConfig
Drone config in the Session category. Session config relates to the current flight and encapsulates user and application data. That is, should the session be changed / reset, the user and application config changes also.
Create a new session by means of:
drone.config.session("My Session Name")
Future code may then access the same session by not passing a session name:
drone.config.session.hoveringRange = 1000
- app
DroneAppConfig app(Str? appicationName := null)Gets or makes application config. If
nullis passed, this just returns the current config.- deleteAll
Void deleteAll()Deletes ALL session data from the drone. Use with caution.
- deleteMe
Void deleteMe()Deletes this session data from the drone.
- detectRoundel
VideoCamera? detectRoundelEnables black & white oriented roundel detection on the given camera. To receive detection data, enable
NavOption.visionDetectin DroneAppConfig.navDataOptions() and inspect thevisionDetectdata inNavDataSet to
nullto disable detection.Corresponds to the configuration keys:
DETECT:detect_typeDETECT:detections_select_vDETECT:detections_select_h
- detectRoundelLoRes
Bool detectRoundelLoResDetection, by default, runs at 60 frames per section (fps) but by setting this to
trueit is reduced to 30 fps, removing unnecessary CPU load when not needed.Corresponds to the
DETECT:detections_select_v_hsyncconfiguration key.- dump
Str dump(Bool dumpToStdOut := true)Dumps all fields to debug string.
- gpsPosition
The GPS position used for media tagging and userbox recording.
When setting values, all unknown values are ignored. To change, pass in a map with just the values you wish to update.
Corresponds to the configuration keys:
GPS:longitudeGPS:latitudeGPS:altitude
- hoverMaxHeight
Int hoverMaxHeightThe maximum distance (in millimetres) the drone should hover. Used when
flyingModeis set toHOVER_ON_(ORIENTED_)ROUNDELCorresponds to the
CONTROL:hovering_rangeconfiguration key.- hoverOnRoundel
Bool hoverOnRoundelSet to
trueto enable roundel detection and activate a semi-autonomous hover on top of an oriented roundel. Setting this also sets thedetectRoundelconfig tovertical.Note
HOVER_ON_ROUNDELwas developed for the 2011 CES autonomous demonstration.Corresponds to the
CONTROL:flying_modeconfiguration key.- id
Int id { private set }The current session ID.
Corresponds to the
CUSTOM:profile_idconfiguration key.- make
new make(Drone drone)Creates a new
DroneSessionConfiginstance for the given Drone. Note this class holds no state.- name
Str name { private set }The current session name.
Corresponds to the
CUSTOM:profile_descconfiguration key.- takePhoto
Void takePhoto(Int numberOfPhotos := 1, Duration delayBetweenPhotos := 1sec)Takes photographs with the forward facing front camera and saves it as JPEG images named
/data/video/boxes/tmp_flight_<dateTime>/picture_<dateTime>.jpg.Note
delayBetweenPhotosmust be in seconds.Corresponds to the
USERBOX:userbox_cmdconfiguration key.- user
DroneUserConfig user(Str? userName := null)Gets or makes user config.
- userboxCancel
Void userboxCancel()Stops saving navigation data to flash memory and deletes the temporary files.
Corresponds to the
USERBOX:userbox_cmdconfiguration key.- userboxStart
Void userboxStart()Starts saving navigation data to flash memory.
Creates the binary file
/data/video/boxes/tmp_flight_<dateTime>/userbox_<timestamp>in flash memory containing navigation data where<timestamp>is the time since the drone booted.Corresponds to the
USERBOX:userbox_cmdconfiguration key.- userboxStop
Void userboxStop()Stops saving navigation data to flash memory.
Renames the directory containing the binary files to
/data/video/boxes/flight_<dateTime>/.Corresponds to the
USERBOX:userbox_cmdconfiguration key.- videoCamera
VideoCamera videoCameraSelects which video camera on the drone to stream data back from.
Corresponds to the
VIDEO:video_channelconfiguration key.- videoFps
Int videoFpsSets the frames per second (fps) of the live video codec. Values should be between 15 and 30.
Corresponds to the
VIDEO:codec_fpsconfiguration key.- videoMaxBitrate
Int videoMaxBitrateMaximum bitrate (kilobits per second) the device can decode. This is set as the upper bound for drone bitrate values.
Typical values for Apple iOS Device are:
- iPhone 4S : 4000 kbps
- iPhone 4 : 1500 kbps
- iPhone 3GS : 500 kbps
When using the bitrate control mode in
VBC_MANUAL, this maximum bitrate is ignored.When using the bitrate control mode in
VBC_MODE_DISABLED, the bitrate is fixed to this maximum bitrate.Can only be set with a non-default session ID. Throws an Err if this is not the case.
Corresponds to the
VIDEO:max_bitrateconfiguration key.- videoResolution
VideoResolution videoResolutionSelects the resolution of the video that's streamed back.
It is generally not advised to change this whilst video is already streaming.
Can only be set with a non-default session ID. Throws an Err if this is not the case.
Corresponds to the
VIDEO:video_codecconfiguration key.