Class MotorControlMode

  • All Implemented Interfaces:
    NetworkTablePopulator, TuningMode

    public class MotorControlMode
    extends java.lang.Object
    implements TuningMode
    Tuning mode for setting the velocity of individual motors. This is done with open loop control.
    • Constructor Summary

      Constructors 
      Constructor Description
      MotorControlMode​(SwerveModule[] modules)
      Constructs a motor control mode object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void init()
      Called when this mode transitions from disabled to enabled.
      void populateNetworkTable​(edu.wpi.first.networktables.NetworkTable table)
      Populates the given network table with data from this class.
      void run()
      Called repeatedly while this mode is enabled.
      • Methods inherited from class java.lang.Object

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

      • MotorControlMode

        public MotorControlMode​(SwerveModule[] modules)
        Constructs a motor control mode object.
        Parameters:
        modules - The modules whose motors will be controlled.
    • Method Detail

      • init

        public void init()
        Description copied from interface: TuningMode
        Called when this mode transitions from disabled to enabled.
        Specified by:
        init in interface TuningMode
      • run

        public void run()
        Description copied from interface: TuningMode
        Called repeatedly while this mode is enabled.
        Specified by:
        run in interface TuningMode
      • populateNetworkTable

        public void populateNetworkTable​(edu.wpi.first.networktables.NetworkTable table)
        Description copied from interface: NetworkTablePopulator
        Populates the given network table with data from this class. May also read in values.
        Specified by:
        populateNetworkTable in interface NetworkTablePopulator
        Parameters:
        table - The table to populate, and possibly read from.