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

  • Tells whether the animation has the corresponding issue.

    Note

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

    Declaration

    Swift

    func isIssuePresent(_ animation: AnimationType, requierement: AnimationIssue) -> Bool

    Parameters

    animation

    the animation type to query

    requierement

    requierement to fix

  • Tells whether the animation is supported for a piloting mode.

    Declaration

    Swift

    func isAnimationSupported(animation: AnimationType, mode: PilotingMode) -> Bool

    Parameters

    animation

    the animation type to query

    mode

    piloting mode

  • 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