Package lib.custom.motorcontrollers
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
-
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.WarningsNested 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.SparkModelNested classes/interfaces inherited from class com.revrobotics.NativeResourceCleaner
com.revrobotics.NativeResourceCleaner.OnCleanNested classes/interfaces inherited from interface lib.custom.motorcontrollers.SmartMotorController
SmartMotorController.SpeedModifiedSmartMotor -
Field Summary
FieldsFields inherited from class com.revrobotics.spark.SparkMax
configAccessorFields inherited from class com.revrobotics.spark.SparkBase
absoluteEncoder, absoluteEncoderLock, analogSensor, analogSensorLock, closedLoopController, closedLoopControllerLock, encoder, encoderLock, forwardLimitSwitch, forwardLimitSwitchLock, forwardSoftLimit, forwardSoftLimitLock, reverseLimitSwitch, reverseLimitSwitchLock, reverseSoftLimit, reverseSoftLimitLockFields inherited from class com.revrobotics.spark.SparkLowLevel
expectedSparkModel, isClosed, kAPIBuildVersion, kAPIMajorVersion, kAPIMinorVersion, kAPIVersion, motorType, sparkHandle -
Constructor Summary
ConstructorsConstructorDescriptionCustomSparkMax(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 TypeMethodDescriptionbooleanbooleanvoidsetInverted(boolean inverted) voidsetMotorBrake(boolean brake) Methods inherited from class com.revrobotics.spark.SparkMax
configure, configure, getAbsoluteEncoder, getAlternateEncoder, getForwardLimitSwitch, getReverseLimitSwitchMethods 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, stopMotorMethods 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, throwIfClosedMethods inherited from class com.revrobotics.NativeResourceCleaner
registerCleanerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj.motorcontrol.MotorController
disable, get, getInverted, set, setVoltage, setVoltage, stopMotorMethods 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
-
setMotorBrake
public void setMotorBrake(boolean brake) - Specified by:
setMotorBrakein interfaceSmartMotorController
-
setInverted
public void setInverted(boolean inverted) - Specified by:
setInvertedin interfaceedu.wpi.first.wpilibj.motorcontrol.MotorController- Overrides:
setInvertedin classcom.revrobotics.spark.SparkBase
-
isFwdLimitSwitchPressed
- Specified by:
isFwdLimitSwitchPressedin interfaceSmartMotorController- Throws:
IllegalAccessException
-
isRevLimitSwitchPressed
- Specified by:
isRevLimitSwitchPressedin interfaceSmartMotorController- Throws:
IllegalAccessException
-