Adding module zeroing constants and a few other minor changes from 2/3 build session

This commit is contained in:
2026-02-03 18:32:32 -05:00
parent e4a58f00df
commit ffc1c0cd8b
4 changed files with 36 additions and 12 deletions

View File

@@ -0,0 +1,23 @@
package frc.robot.utilities;
import java.util.function.DoubleSupplier;
import com.revrobotics.spark.SparkMax;
import com.revrobotics.spark.SparkLowLevel.MotorType;
import edu.wpi.first.wpilibj2.command.Command;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
public class SparkMAXTester extends SubsystemBase {
private SparkMax spark;
public SparkMAXTester(int deviceID) {
spark = new SparkMax(deviceID, MotorType.kBrushless);
}
public Command setSpeed(DoubleSupplier speed) {
return run(() -> {
spark.set(speed.getAsDouble());
});
}
}