Class WsSparkMaxFollowerConfig

  • All Implemented Interfaces:
    OutputConfig

    public class WsSparkMaxFollowerConfig
    extends java.lang.Object
    implements OutputConfig
    Contains configurations for Spark Max motor controller followers.
    • Constructor Summary

      Constructors 
      Constructor Description
      WsSparkMaxFollowerConfig​(java.lang.String following, int channel, boolean brushless)
      Construct the Phoenix config.
      WsSparkMaxFollowerConfig​(java.lang.String following, int channel, boolean brushless, boolean oppose)
      Construct the Phoenix config.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getChannel()
      Returns the hardware port number.
      java.lang.String getFollowing()
      Returns the name of the followed motor controller.
      WsMotorControllers getType()
      Returns true if the motor controller is a Talon.
      boolean isBrushless()
      Returns true if the motor is brushless.
      boolean isOpposing()
      Returns if the follower should oppose the followed.
      java.lang.String toString()
      Builds a JSON String describing the Phoenix config.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • WsSparkMaxFollowerConfig

        public WsSparkMaxFollowerConfig​(java.lang.String following,
                                        int channel,
                                        boolean brushless)
        Construct the Phoenix config.
        Parameters:
        following - Name of motor controller being followed.
        channel - Hardware port number.
        brushless - True if the motor is brushless, false if brushed.
      • WsSparkMaxFollowerConfig

        public WsSparkMaxFollowerConfig​(java.lang.String following,
                                        int channel,
                                        boolean brushless,
                                        boolean oppose)
        Construct the Phoenix config.
        Parameters:
        following - Name of motor controller being followed.
        channel - Hardware port number.
        brushless - True if the motor is brushless, false if brushed.
        oppose - True if the follow should oppose the direction of this motor.
    • Method Detail

      • getFollowing

        public java.lang.String getFollowing()
        Returns the name of the followed motor controller.
        Returns:
        The name of followed motor controller.
      • getChannel

        public int getChannel()
        Returns the hardware port number.
        Returns:
        The hardware port number.
      • isBrushless

        public boolean isBrushless()
        Returns true if the motor is brushless.
        Returns:
        True if the motor is brushless, false if brushed.
      • getType

        public WsMotorControllers getType()
        Returns true if the motor controller is a Talon.
        Returns:
        True if Talon, false if Victor.
      • isOpposing

        public boolean isOpposing()
        Returns if the follower should oppose the followed.
        Returns:
        True if opposing.
      • toString

        public java.lang.String toString()
        Builds a JSON String describing the Phoenix config.
        Overrides:
        toString in class java.lang.Object
        Returns:
        Channel number, is brushless, and is opposing.