AnimationPilotingItf

public protocol AnimationPilotingItf : PilotingItf

Animation piloting interface.

This piloting interface cannot be activated or deactivated. It is present as soon as a drone supporting animations is connected. It is removed as soon as the drone is disconnected.

According to different parameters, the list of available animations can change. These parameters can be (not exhaustive):

  • Current activated piloting interface
  • Information about the controller (such as location)
  • Internal state of the drone (such as battery level, gps fix…)

This piloting interface can be retrieved by:

drone.getPilotingItf(animation)
  • Set of currently available animations.

    Declaration

    Swift

    var availableAnimations: Set<AnimationType> { get }
  • Currently executing animation. nil if no animation is playing.

    Declaration

    Swift

    var animation: Animation? { get }
  • Availability issues for each animation.

    Note

    If there is no issue for an animation, it doesn’t mean it is available. It needs to be in the right mode (See supportedAnimations).

    Note

    not supported by all drone models, it will always return an empty set in that case.

    Declaration

    Swift

    var availabilityIssues: [AnimationType : Set<AnimationIssue>]? { get }
  • Animations supported for each piloting mode.

    Note

    not supported by all drone models, it will always return an empty set in that case.

    Declaration

    Swift

    var supportedAnimations: [PilotingMode : Set<AnimationType>]? { get }
  • Starts an animation.

    Declaration

    Swift

    func startAnimation(config: AnimationConfig) -> Bool

    Parameters

    config

    configuration of the animation to execute

    Return Value

    true if an animation request was sent to the drone, false otherwise

  • Aborts any currently executing animation.

    Declaration

    Swift

    func abortCurrentAnimation() -> Bool

    Return Value

    true if an animation cancellation request was sent to the drone, false otherwise