generated from StuyPulse/Phil
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made tests for everyhting excpet swerrve :3
Co-authored-by: naveed1117 <naveed1117@users.noreply.github.com> Co-authored-by: Lapcas <Lapcas@users.noreply.github.com>
- Loading branch information
1 parent
955b2a3
commit c91b602
Showing
8 changed files
with
252 additions
and
1 deletion.
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
32 changes: 32 additions & 0 deletions
32
src/main/java/com/stuypulse/robot/subsystems/AmperTest.java
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
import com.revrobotics.RelativeEncoder; | ||
import com.revrobotics.CANSparkLowLevel.MotorType; | ||
import com.stuypulse.robot.constants.Ports; | ||
|
||
|
||
public class AmperTest { | ||
private final CANSparkMax scoreMotor; | ||
private final CANSparkMax liftMotor; | ||
private final RelativeEncoder liftEncoder; | ||
|
||
public AmperTest(){ | ||
scoreMotor = new CANSparkMax(Ports.Amper.SCORE, MotorType.kBrushless); | ||
liftMotor = new CANSparkMax(Ports.Amper.LIFT, MotorType.kBrushless); | ||
liftEncoder = liftMotor.getEncoder(); | ||
} | ||
|
||
public void setAmperVoltage(double voltage){ | ||
scoreMotor.set(voltage); | ||
} | ||
|
||
public void setLiftVoltage(double voltage){ | ||
liftMotor.set(voltage); | ||
} | ||
|
||
public void stop(){ | ||
scoreMotor.set(0); | ||
liftMotor.set(0); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/com/stuypulse/robot/subsystems/ClimberTest.java
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
import com.revrobotics.RelativeEncoder; | ||
import com.revrobotics.CANSparkLowLevel.MotorType; | ||
import com.stuypulse.robot.constants.Ports; | ||
|
||
public class ClimberTest{ | ||
private final CANSparkMax leftMotor; | ||
private final CANSparkMax rightMotor; | ||
private final RelativeEncoder rightEncoder; | ||
private final RelativeEncoder leftEncoder; | ||
|
||
public ClimberTest(){ | ||
leftMotor = new CANSparkMax(Ports.Climber.LEFT_MOTOR, MotorType.kBrushless); | ||
rightMotor = new CANSparkMax(Ports.Climber.RIGHT_MOTOR, MotorType.kBrushless); | ||
|
||
rightEncoder = rightMotor.getEncoder(); | ||
leftEncoder = leftMotor.getEncoder(); | ||
} | ||
public void setLeftVoltage(double voltage){ | ||
leftMotor.set(voltage); | ||
} | ||
public void setRightVoltage(double voltage){ | ||
rightMotor.set(voltage); | ||
} | ||
|
||
public void stop() { | ||
leftMotor.set(0); | ||
rightMotor.set(0); | ||
} | ||
|
||
} | ||
|
||
|
35 changes: 35 additions & 0 deletions
35
src/main/java/com/stuypulse/robot/subsystems/ConveyerTest.java
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
import com.revrobotics.RelativeEncoder; | ||
import com.revrobotics.CANSparkLowLevel.MotorType; | ||
import com.stuypulse.robot.constants.Ports; | ||
|
||
public class ConveyerTest { | ||
private final CANSparkMax gandalfMotor; | ||
private final CANSparkMax shooterFeederMotor; | ||
private final RelativeEncoder gandalfEncoder; | ||
private final RelativeEncoder shooterFeederEncoder; | ||
|
||
public ConveyerTest(){ | ||
gandalfMotor = new CANSparkMax(Ports.Conveyor.GANDALF, MotorType.kBrushless); | ||
shooterFeederMotor = new CANSparkMax(Ports.Conveyor.FEEDER, MotorType.kBrushless); | ||
|
||
gandalfEncoder = gandalfMotor.getEncoder(); | ||
shooterFeederEncoder = shooterFeederMotor.getEncoder(); | ||
} | ||
|
||
public void setGandalfVoltage(double voltage){ | ||
gandalfMotor.set(voltage); | ||
} | ||
|
||
public void setShooterFeederVoltage(double voltage){ | ||
shooterFeederMotor.set(voltage); | ||
} | ||
|
||
public void stop(){ | ||
gandalfMotor.set(0); | ||
shooterFeederMotor.set(0); | ||
} | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/com/stuypulse/robot/subsystems/IntakeTest.java
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
import com.revrobotics.CANSparkLowLevel.MotorType; | ||
import com.stuypulse.robot.constants.Ports; | ||
|
||
public class IntakeTest { | ||
private final CANSparkMax motor; | ||
|
||
public IntakeTest() { | ||
motor = new CANSparkMax(Ports.Intake.MOTOR, MotorType.kBrushless); | ||
} | ||
public void setIntakeVoltage(double voltage) { | ||
motor.set(voltage); | ||
} | ||
|
||
public void stop() { | ||
motor.set(0); | ||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/com/stuypulse/robot/subsystems/ShooterTest.java
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
import com.stuypulse.robot.constants.Ports; | ||
import com.stuypulse.stuylib.network.SmartNumber; | ||
import com.revrobotics.CANSparkMax; | ||
import com.revrobotics.RelativeEncoder; | ||
import com.revrobotics.CANSparkLowLevel.MotorType; | ||
|
||
public class ShooterTest { | ||
private final CANSparkMax leftMotor; | ||
private final CANSparkMax rightMotor; | ||
|
||
private final RelativeEncoder leftEncoder; | ||
private final RelativeEncoder rightEncoder; | ||
public ShooterTest() { | ||
leftMotor = new CANSparkMax(Ports.Shooter.LEFT_MOTOR, MotorType.kBrushless); | ||
rightMotor = new CANSparkMax(Ports.Shooter.RIGHT_MOTOR, MotorType.kBrushless); | ||
} | ||
|
||
public void setRightVoltage(double voltage) { | ||
rightMotor.set(voltage); | ||
} | ||
|
||
public void setLeftVoltage(double voltage) { | ||
leftMotor.set(voltage); | ||
} | ||
|
||
public void stop() { | ||
leftMotor.set(0); | ||
rightMotor.set(0); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.stuypulse.robot.subsystems; | ||
|
||
public class SwerveTest { | ||
//TODO modules then uh absolute encoders to test zero angles then ummmmmmm set voltage ^w^ | ||
} |