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 }
  • 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