Class CustomSparkMax

java.lang.Object
com.revrobotics.NativeResourceCleaner
com.revrobotics.spark.SparkLowLevel
com.revrobotics.spark.SparkBase
com.revrobotics.spark.SparkMax
lib.custom.motorcontrollers.CustomSparkMax
All Implemented Interfaces:
com.revrobotics.REVDevice, edu.wpi.first.wpilibj.motorcontrol.MotorController, AutoCloseable, SmartMotorController

public class CustomSparkMax extends com.revrobotics.spark.SparkMax implements SmartMotorController
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.revrobotics.spark.SparkBase

    com.revrobotics.spark.SparkBase.ControlType, com.revrobotics.spark.SparkBase.Faults, com.revrobotics.spark.SparkBase.PersistMode, com.revrobotics.spark.SparkBase.ResetMode, com.revrobotics.spark.SparkBase.Warnings

    Nested classes/interfaces inherited from class com.revrobotics.spark.SparkLowLevel

    com.revrobotics.spark.SparkLowLevel.MotorType, com.revrobotics.spark.SparkLowLevel.PeriodicFrame, com.revrobotics.spark.SparkLowLevel.PeriodicStatus0, com.revrobotics.spark.SparkLowLevel.PeriodicStatus1, com.revrobotics.spark.SparkLowLevel.PeriodicStatus2, com.revrobotics.spark.SparkLowLevel.PeriodicStatus3, com.revrobotics.spark.SparkLowLevel.PeriodicStatus4, com.revrobotics.spark.SparkLowLevel.PeriodicStatus5, com.revrobotics.spark.SparkLowLevel.PeriodicStatus6, com.revrobotics.spark.SparkLowLevel.PeriodicStatus7, com.revrobotics.spark.SparkLowLevel.PeriodicStatus8, com.revrobotics.spark.SparkLowLevel.PeriodicStatus9, com.revrobotics.spark.SparkLowLevel.SparkModel

    Nested classes/interfaces inherited from class com.revrobotics.NativeResourceCleaner

    com.revrobotics.NativeResourceCleaner.OnClean

    Nested classes/interfaces inherited from interface lib.custom.motorcontrollers.SmartMotorController

    SmartMotorController.SpeedModifiedSmartMotor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final boolean
     

    Fields inherited from class com.revrobotics.spark.SparkMax

    configAccessor

    Fields inherited from class com.revrobotics.spark.SparkBase

    absoluteEncoder, absoluteEncoderLock, analogSensor, analogSensorLock, closedLoopController, closedLoopControllerLock, encoder, encoderLock, forwardLimitSwitch, forwardLimitSwitchLock, forwardSoftLimit, forwardSoftLimitLock, reverseLimitSwitch, reverseLimitSwitchLock, reverseSoftLimit, reverseSoftLimitLock

    Fields inherited from class com.revrobotics.spark.SparkLowLevel

    expectedSparkModel, isClosed, kAPIBuildVersion, kAPIMajorVersion, kAPIMinorVersion, kAPIVersion, motorType, sparkHandle
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType)
     
    CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType, boolean inverted)
     
    CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType, boolean inverted, boolean limitSwitch)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
    setInverted(boolean inverted)
     
    void
    setMotorBrake(boolean brake)
     

    Methods inherited from class com.revrobotics.spark.SparkMax

    configure, configure, getAbsoluteEncoder, getAlternateEncoder, getForwardLimitSwitch, getReverseLimitSwitch

    Methods inherited from class com.revrobotics.spark.SparkBase

    clearFaults, configureAsync, configureAsync, disable, get, getAnalog, getAppliedOutput, getBusVoltage, getClosedLoopController, getEncoder, getFaults, getForwardSoftLimit, getInverted, getLastError, getMotorTemperature, getOutputCurrent, getReverseSoftLimit, getStickyFaults, getStickyWarnings, getWarnings, hasActiveFault, hasActiveWarning, hasStickyFault, hasStickyWarning, isFollower, pauseFollowerMode, pauseFollowerModeAsync, resumeFollowerMode, resumeFollowerModeAsync, set, setCANTimeout, setVoltage, stopMotor

    Methods inherited from class com.revrobotics.spark.SparkLowLevel

    close, createSimFaultManager, getCleanAction, getDeviceId, getFirmwareString, getFirmwareVersion, getMotorType, getPeriodicStatus0, getPeriodicStatus1, getPeriodicStatus2, getPeriodicStatus3, getPeriodicStatus4, getPeriodicStatus5, getPeriodicStatus6, getPeriodicStatus7, getPeriodicStatus8, getPeriodicStatus9, getSafeFloat, getSerialNumber, setCANMaxRetries, setControlFramePeriodMs, setPeriodicFrameTimeout, throwIfClosed

    Methods inherited from class com.revrobotics.NativeResourceCleaner

    registerCleaner

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.wpi.first.wpilibj.motorcontrol.MotorController

    disable, get, getInverted, set, setVoltage, setVoltage, stopMotor

    Methods inherited from interface lib.custom.motorcontrollers.SmartMotorController

    withSpeedMultiplier
  • Field Details

    • limitSwitch

      protected final boolean limitSwitch
  • Constructor Details

    • CustomSparkMax

      public CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType, boolean inverted, boolean limitSwitch)
    • CustomSparkMax

      public CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType, boolean inverted)
    • CustomSparkMax

      public CustomSparkMax(int deviceNumber, com.revrobotics.spark.SparkLowLevel.MotorType motorType)
  • Method Details