This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
-
-
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.
- Loading branch information
1 parent
98613e4
commit 82e55a8
Showing
5 changed files
with
137 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package frc.robot.shooter; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
|
||
import frc.robot.util.scheduling.LifecycleSubsystem; | ||
import frc.robot.util.scheduling.SubsystemPriority; | ||
|
||
public class ShooterSubSystem extends LifecycleSubsystem{ | ||
private final CANSparkMax motor; | ||
|
||
private boolean intaking = false; | ||
private boolean shooting = false; | ||
|
||
public ShooterSubSystem(CANSparkMax motor) { | ||
super(SubsystemPriority.SHOOTER); | ||
this.motor = motor; | ||
} | ||
|
||
@Override | ||
public void robotPeriodic() { | ||
if (intaking) { | ||
motor.set(0.3); | ||
} else if (shooting){ | ||
motor.set(-0.5); | ||
} | ||
else { | ||
motor.set(0.0); | ||
} | ||
} | ||
|
||
public void setIntakeMode (boolean intake) { | ||
this.intaking = intake; | ||
} | ||
|
||
public void setShootingMode (boolean shoot) { | ||
this.shooting = shoot; | ||
} | ||
|
||
|
||
} |
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package frc.robot.shooter; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
|
||
import frc.robot.util.scheduling.LifecycleSubsystem; | ||
import frc.robot.util.scheduling.SubsystemPriority; | ||
|
||
public class ShooterSubSystem extends LifecycleSubsystem{ | ||
private final CANSparkMax motor; | ||
|
||
private boolean intaking = false; | ||
private boolean shooting = false; | ||
|
||
public ShooterSubSystem(CANSparkMax motor) { | ||
super(SubsystemPriority.SHOOTER); | ||
this.motor = motor; | ||
} | ||
|
||
@Override | ||
public void robotPeriodic() { | ||
if (intaking) { | ||
motor.set(0.3); | ||
} else if (shooting){ | ||
motor.set(-0.5); | ||
} | ||
else { | ||
motor.set(0.0); | ||
} | ||
} | ||
|
||
public void setIntakeMode (boolean intake) { | ||
this.intaking = intake; | ||
} | ||
|
||
public void setShootingMode (boolean shoot) { | ||
this.shooting = shoot; | ||
} | ||
|
||
|
||
} |
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,29 @@ | ||
package frc.robot.shooter; | ||
|
||
import com.revrobotics.CANSparkMax; | ||
|
||
public class ShooterSubSystem { | ||
|
||
public static final String setIntakeCommand = null; | ||
public final String setShootingCommand = null; | ||
|
||
public ShooterSubSystem(CANSparkMax motor) { | ||
//TODO Auto-generated constructor stub | ||
} | ||
|
||
public void setShootingMode(boolean b) { | ||
// TODO Auto-generated method stub | ||
throw new UnsupportedOperationException("Unimplemented method 'setShootingMode'"); | ||
} | ||
|
||
public Object setIntakeCommand(boolean b) { | ||
// TODO Auto-generated method stub | ||
throw new UnsupportedOperationException("Unimplemented method 'setIntakeCommand'"); | ||
} | ||
|
||
public void setShootingCommand(boolean b) { | ||
// TODO Auto-generated method stub | ||
throw new UnsupportedOperationException("Unimplemented method 'setShootingCommand'"); | ||
} | ||
|
||
} |