Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit 5147222

Browse files
committed
Set the SD keys in intake to use smartdashboard instead of preferences
1 parent 87516a0 commit 5147222

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Robot2018/src/org/usfirst/frc/team199/Robot2018/subsystems/IntakeEject.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ public void lowerIntake() {
125125
}
126126

127127
/**
128-
* <<<<<<< HEAD Toggles the left intake between open and closed
128+
* Toggles the left intake between open and closed
129129
*/
130130
public void toggleLeftIntake() {
131-
boolean open = Robot.getBool("Left Horizontal Solenoid Open", true);
131+
boolean open = SmartDashboard.getBoolean("Left Horizontal Solenoid Open", true);
132132
DoubleSolenoid.Value set;
133133
if (open) {
134134
set = Robot.getBool("Intake Left Horizontal Solenoid Inverted", false) ? DoubleSolenoid.Value.kForward
@@ -138,14 +138,14 @@ public void toggleLeftIntake() {
138138
: DoubleSolenoid.Value.kForward;
139139
}
140140
leftHorizontalSolenoid.set(set);
141-
SmartDashboard.putBoolean("Bool/Left Horizontal Solenoid Open", !open);
141+
SmartDashboard.putBoolean("Left Horizontal Solenoid Open", !open);
142142
}
143143

144144
/**
145145
* Toggles the right intake between open and closed
146146
*/
147147
public void toggleRightIntake() {
148-
boolean open = Robot.getBool("Right Horizontal Solenoid Open", true);
148+
boolean open = SmartDashboard.getBoolean("Right Horizontal Solenoid Open", true);
149149
DoubleSolenoid.Value set;
150150
if (open) {
151151
set = Robot.getBool("Intake Right Horizontal Solenoid Inverted", false) ? DoubleSolenoid.Value.kForward
@@ -155,7 +155,7 @@ public void toggleRightIntake() {
155155
: DoubleSolenoid.Value.kForward;
156156
}
157157
rightHorizontalSolenoid.set(set);
158-
SmartDashboard.putBoolean("Bool/Right Horizontal Solenoid Open", !open);
158+
SmartDashboard.putBoolean("Right Horizontal Solenoid Open", !open);
159159
}
160160

161161
/**
@@ -168,8 +168,8 @@ public void closeIntake() {
168168
DoubleSolenoid.Value rightSet = Robot.getBool("Intake Right Horizontal Solenoid Inverted", false)
169169
? DoubleSolenoid.Value.kReverse
170170
: DoubleSolenoid.Value.kForward;
171-
SmartDashboard.putBoolean("Bool/Left Horizontal Solenoid Open", false);
172-
SmartDashboard.putBoolean("Bool/Right Horizontal Solenoid Open", false);
171+
SmartDashboard.putBoolean("Left Horizontal Solenoid Open", false);
172+
SmartDashboard.putBoolean("Right Horizontal Solenoid Open", false);
173173
leftHorizontalSolenoid.set(leftSet);
174174
rightHorizontalSolenoid.set(rightSet);
175175
}
@@ -184,8 +184,8 @@ public void openIntake() {
184184
DoubleSolenoid.Value rightSet = Robot.getBool("Intake Right Horizontal Solenoid Inverted", false)
185185
? DoubleSolenoid.Value.kForward
186186
: DoubleSolenoid.Value.kReverse;
187-
SmartDashboard.putBoolean("Bool/Left Horizontal Solenoid Open", true);
188-
SmartDashboard.putBoolean("Bool/Right Horizontal Solenoid Open", true);
187+
SmartDashboard.putBoolean("Left Horizontal Solenoid Open", true);
188+
SmartDashboard.putBoolean("Right Horizontal Solenoid Open", true);
189189
leftHorizontalSolenoid.set(leftSet);
190190
rightHorizontalSolenoid.set(rightSet);
191191
}

0 commit comments

Comments
 (0)