Skip to content

Commit 63c538b

Browse files
finished up more stuff for grabber target angle
1 parent 16222d1 commit 63c538b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/frc/robot/subsystems/grabber/GrabberSubsystem.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public enum GrabberStates{
2929
private final GrabberIO io_;
3030
//Figure out grabber target rotation
3131
//Using 1 as a placeholder for now
32-
private Angle target_grabber= Rotations.of(1);
32+
private Angle target_grabber;
3333
private final GrabberIOInputs inputs_;
3434
private GrabberStates states;
3535
public int ejectswitch;
@@ -39,7 +39,7 @@ public GrabberSubsystem(GrabberIO io){
3939
io= io_;
4040
ejectswitch=0;
4141
inputs_= new GrabberIOInputs();
42-
target_grabber= Rotations.zero();
42+
target_grabber= Rotations.of(1);
4343
states= GrabberStates.Stationary;
4444
}
4545

@@ -105,6 +105,7 @@ public Command grabAlgae(){
105105

106106
public Command collectCoral(){
107107
return runOnce(() -> {
108+
io_.setGrabberTarget(target_grabber);
108109
if(hasCoralBool()==false){
109110
io_.setGrabberVoltage(Volts.of(1));
110111
if(hasCoralBool()==true){
@@ -116,6 +117,7 @@ public Command collectCoral(){
116117

117118
public Command ejectCoral(){
118119
return runOnce(() -> {
120+
io_.setGrabberTarget(target_grabber);
119121
if(hasCoralBool()==true || hasCoralBool()==false){
120122
io_.setGrabberVoltage(Volts.of(1.2));
121123
if(hasCoralBool()==false){

0 commit comments

Comments
 (0)