Package frc8768.robot.subsystems
Class TankSubsystemSpark
java.lang.Object
frc8768.robot.subsystems.TankSubsystemSpark
- All Implemented Interfaces:
edu.wpi.first.wpilibj2.command.Subsystem
Subsystem for all things Tank related (Spark Max)
-
Constructor Summary
ConstructorsConstructorDescriptionTankSubsystemSpark
(Set<Integer> motorIdsLeft, Set<Integer> motorIdsRight, boolean[] motorsLeftInverted, boolean[] motorsRightInverted, com.revrobotics.spark.SparkLowLevel.MotorType type) Tank subsystem constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
drive
(edu.wpi.first.math.geometry.Translation2d translation2d) Drive the subsystem.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.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, getName, periodic, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
TankSubsystemSpark
public TankSubsystemSpark(Set<Integer> motorIdsLeft, Set<Integer> motorIdsRight, boolean[] motorsLeftInverted, boolean[] motorsRightInverted, com.revrobotics.spark.SparkLowLevel.MotorType type) Tank subsystem constructor.- Parameters:
motorIdsLeft
- CAN IDs for left side motors.motorIdsRight
- CAN IDs for right side motors.motorsLeftInverted
- Left IDs -> inverted.motorsRightInverted
- Right IDs -> inverted.type
- Brushless or Brushed, seeSparkLowLevel.MotorType
-
-
Method Details
-
drive
public void drive(edu.wpi.first.math.geometry.Translation2d translation2d) Drive the subsystem.- Parameters:
translation2d
- X = Left, Y = Right.
-