GSAnimationPilotingItf

@objc
public protocol GSAnimationPilotingItf : 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 animation 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 peripheral can be retrieved by:

(id<AnimationPilotingItf>) [drone getPilotingItf:GSPilotingItfs.animation]

Note

this protocol is for Objective-C only. Swift must use the protocol AnimationPilotingItf.
  • Currently executing animation. nil if no animation is playing

    Declaration

    Swift

    var animation: Animation? { get }
  • Tells whether the given animation type is currently available on the drone.

    Declaration

    Swift

    func isAnimationAvailable(_ animation: AnimationType) -> Bool

    Parameters

    animation

    the animation type to query

    Return Value

    true if this type of animation is currently available

  • 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