-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Team1810Robotics/cleaning
fix me fixes
- Loading branch information
Showing
11 changed files
with
52 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
package frc.robot.subsystems; | ||
|
||
import edu.wpi.first.wpilibj.motorcontrol.VictorSP; | ||
import com.ctre.phoenix.motorcontrol.ControlMode; | ||
import com.ctre.phoenix.motorcontrol.can.VictorSPX; | ||
import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||
import frc.robot.Constants; | ||
|
||
public class TrapSubsystem extends SubsystemBase { | ||
|
||
/** | ||
* FIXME: should be private, should be a {@link com.ctre.phoenix.motorcontrol.can.VictorSPX} not | ||
* a {@link edu.wpi.first.wpilibj.motorcontrol.VictorSP} | ||
*/ | ||
VictorSP victor = new VictorSP(Constants.TrapConstants.VICTOR_MOTOR_PORT); | ||
VictorSPX victor = new VictorSPX(Constants.TrapConstants.VICTOR_MOTOR_ID); | ||
|
||
// FIXME: rename to setSpeed() to keep consistent with other subsystems | ||
public void motorOn(double victorSpeed) { | ||
victor.set(victorSpeed); | ||
|
||
public void setSpeed(double victorSpeed) { | ||
victor.set(ControlMode.PercentOutput, victorSpeed); | ||
} | ||
|
||
// FIXME: remane to stop() to keep consistent with other subsystems | ||
public void motorOff() { | ||
victor.set(0); | ||
public void stop() { | ||
victor.set(ControlMode.PercentOutput, 0); | ||
} | ||
} |