Class CANSparkMaxUtil


  • public class CANSparkMaxUtil
    extends java.lang.Object
    Sets motor usage for a Spark Max motor controller
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CANSparkMaxUtil.Usage  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setCANSparkMaxBusUsage​(com.revrobotics.CANSparkMax motor, CANSparkMaxUtil.Usage usage)
      This function allows reducing a Spark Max's CAN bus utilization by reducing the periodic status frame period of nonessential frames from 20ms to 500ms.
      static void setCANSparkMaxBusUsage​(com.revrobotics.CANSparkMax motor, CANSparkMaxUtil.Usage usage, boolean enableFollowing)
      This function allows reducing a Spark Max's CAN bus utilization by reducing the periodic status frame period of nonessential frames from 20ms to 500ms.
      • Methods inherited from class java.lang.Object

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

      • setCANSparkMaxBusUsage

        public static void setCANSparkMaxBusUsage​(com.revrobotics.CANSparkMax motor,
                                                  CANSparkMaxUtil.Usage usage,
                                                  boolean enableFollowing)
        This function allows reducing a Spark Max's CAN bus utilization by reducing the periodic status frame period of nonessential frames from 20ms to 500ms.

        See https://docs.revrobotics.com/sparkmax/operating-modes/control-interfaces#periodic-status-frames for a description of the status frames.

        Parameters:
        motor - The motor to adjust the status frame periods on.
        usage - The status frame feedack to enable. kAll is the default when a CANSparkMax is constructed.
        enableFollowing - Whether to enable motor following.
      • setCANSparkMaxBusUsage

        public static void setCANSparkMaxBusUsage​(com.revrobotics.CANSparkMax motor,
                                                  CANSparkMaxUtil.Usage usage)
        This function allows reducing a Spark Max's CAN bus utilization by reducing the periodic status frame period of nonessential frames from 20ms to 500ms.

        See https://docs.revrobotics.com/sparkmax/operating-modes/control-interfaces#periodic-status-frames for a description of the status frames.

        Parameters:
        motor - The motor to adjust the status frame periods on.
        usage - The status frame feedack to enable. kAll is the default when a CANSparkMax is constructed.