Skip to content

Commit 996cd1e

Browse files
committed
a
1 parent c310cfb commit 996cd1e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/main/java/frc/robot/Modules/MotorControl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,13 @@ public static void motor_init() {
104104
public static void setRPM(MotorPositions position, int RPM) {
105105
switch(position) {
106106
case Shooter:
107-
WPI_TalonFX motor = RobotInformation.RobotData.MotorData.Shooter.Flywheel.motor;
108-
double current_velocity = getCurrentVelocity(motor);
107+
WPI_TalonFX flywheel_motor = RobotInformation.RobotData.MotorData.Shooter.Flywheel.motor;
108+
double current_velocity = getCurrentVelocity(flywheel_motor);
109109
double current_RPM = (60 * current_velocity) / (2 * Math.PI);
110+
110111
break;
111112
case Rollers:
113+
TalonSRX roller_motor = RobotInformation.RobotData.MotorData.Intake.Rollers.motor;
112114

113115
break;
114116
case Extension:

src/main/java/frc/robot/Robot.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import com.ctre.phoenix.motorcontrol.can.WPI_TalonFX;
3232
import edu.wpi.first.wpilibj.drive.DifferentialDrive;
3333
import com.ctre.phoenix.motorcontrol.can.TalonSRX;
34+
35+
import edu.wpi.first.math.controller.PIDController;
3436
import edu.wpi.first.networktables.NetworkTable;
3537
import edu.wpi.first.networktables.NetworkTableInstance;
3638

@@ -132,6 +134,16 @@ public void testPeriodic() {
132134
SmartDashboard.putNumber("Max RPM",RobotInformation.RobotData.MotorData.Shooter.Flywheel.maxRPM);
133135
SmartDashboard.putNumber("Flywheel Velocity", current_velocity);
134136
SmartDashboard.putNumber("Testing Flywheel RPM", current_RPM);
137+
138+
139+
// PIDController FlywheelPIDController = new PIDController(RobotInformation.PID_Values.flywheel.kP, RobotInformation.PID_Values.flywheel.kI, RobotInformation.PID_Values.flywheel.kD);
140+
// FlywheelPIDController.calculate(shooterFly.getSensorCollection().getIntegratedSensorAbsolutePosition());
141+
// FlywheelPIDController.close();
142+
SmartDashboard.putNumber("Wrist Value", wrist.getSensorCollection().getIntegratedSensorAbsolutePosition());
143+
}
144+
145+
@Override
146+
public void testExit() {
135147
}
136148

137149
@Override

0 commit comments

Comments
 (0)