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

Commit dccf8a7

Browse files
Fix bug in Intake (Issue 110)
1 parent 93f22f9 commit dccf8a7

File tree

5 files changed

+229
-121
lines changed

5 files changed

+229
-121
lines changed

CompSD.xml

Lines changed: 219 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -128,132 +128,237 @@
128128
</widget>
129129
</dashboard>
130130
<live-window>
131+
<widget field="IntakeEject" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
132+
<location x="347" y="72"/>
133+
</widget>
134+
<widget field="Climber" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
135+
<location x="347" y="48"/>
136+
</widget>
131137
<widget field="Drivetrain" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
132-
<location x="3" y="14"/>
138+
<location x="347" y="24"/>
133139
</widget>
134140
<widget field="ClimberAssist" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
135-
<location x="9" y="11"/>
141+
<location x="347" y="0"/>
136142
</widget>
137-
<widget field="IntakeEject" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
138-
<location x="30" y="22"/>
143+
<widget field="Ungrouped" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
144+
<widget field="Encoder[1]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
145+
<location x="0" y="0"/>
146+
<height>0</height>
147+
<width>0</width>
148+
</widget>
149+
<widget field="Encoder[1]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
150+
<location x="0" y="0"/>
151+
<height>0</height>
152+
<width>0</width>
153+
</widget>
154+
<widget field="DoubleSolenoid[0,2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
155+
<location x="0" y="0"/>
156+
<height>0</height>
157+
<width>0</width>
158+
</widget>
159+
<widget field="DoubleSolenoid[0,2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
160+
<location x="0" y="0"/>
161+
<height>0</height>
162+
<width>0</width>
163+
</widget>
164+
<widget field="DigitalInput[0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
165+
<location x="0" y="0"/>
166+
<height>0</height>
167+
<width>0</width>
168+
</widget>
169+
<widget field="DigitalInput[0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
170+
<location x="0" y="0"/>
171+
<height>0</height>
172+
<width>0</width>
173+
</widget>
174+
<widget field="PowerDistributionPanel[0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.PowerDistributionPanel">
175+
<location x="0" y="0"/>
176+
<height>0</height>
177+
<width>0</width>
178+
</widget>
179+
<widget field="PowerDistributionPanel[0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.PowerDistributionPanel">
180+
<location x="0" y="0"/>
181+
<height>0</height>
182+
<width>0</width>
183+
</widget>
184+
<widget field="VictorSP[8]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
185+
<location x="0" y="0"/>
186+
<height>0</height>
187+
<width>0</width>
188+
</widget>
189+
<widget field="VictorSP[8]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
190+
<location x="0" y="0"/>
191+
<height>0</height>
192+
<width>0</width>
193+
</widget>
194+
<widget field="Encoder[4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
195+
<location x="0" y="0"/>
196+
<height>0</height>
197+
<width>0</width>
198+
</widget>
199+
<widget field="Encoder[4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
200+
<location x="0" y="0"/>
201+
<height>0</height>
202+
<width>0</width>
203+
</widget>
204+
<widget field="VictorSP[9]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
205+
<location x="0" y="0"/>
206+
<height>0</height>
207+
<width>0</width>
208+
</widget>
209+
<widget field="VictorSP[9]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
210+
<location x="0" y="0"/>
211+
<height>0</height>
212+
<width>0</width>
213+
</widget>
214+
<widget field="DigitalInput[3]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
215+
<location x="0" y="0"/>
216+
<height>0</height>
217+
<width>0</width>
218+
</widget>
219+
<widget field="DigitalInput[3]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
220+
<location x="0" y="0"/>
221+
<height>0</height>
222+
<width>0</width>
223+
</widget>
224+
<widget field="DigitalInput[5]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
225+
<location x="0" y="0"/>
226+
<height>0</height>
227+
<width>0</width>
228+
</widget>
229+
<widget field="DigitalInput[5]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
230+
<location x="0" y="0"/>
231+
<height>0</height>
232+
<width>0</width>
233+
</widget>
234+
<widget field="DigitalInput[4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
235+
<location x="0" y="0"/>
236+
<height>0</height>
237+
<width>0</width>
238+
</widget>
239+
<widget field="DigitalInput[4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
240+
<location x="0" y="0"/>
241+
<height>0</height>
242+
<width>0</width>
243+
</widget>
244+
<widget field="Talon SRX [6]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
245+
<location x="0" y="0"/>
246+
<height>0</height>
247+
<width>0</width>
248+
</widget>
249+
<widget field="Talon SRX [6]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
250+
<location x="0" y="0"/>
251+
<height>0</height>
252+
<width>0</width>
253+
</widget>
254+
<widget field="Encoder[3]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
255+
<location x="0" y="0"/>
256+
<height>0</height>
257+
<width>0</width>
258+
</widget>
259+
<widget field="Encoder[3]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
260+
<location x="0" y="0"/>
261+
<height>0</height>
262+
<width>0</width>
263+
</widget>
264+
<widget field="DoubleSolenoid[0,4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
265+
<location x="0" y="0"/>
266+
<height>0</height>
267+
<width>0</width>
268+
</widget>
269+
<widget field="DoubleSolenoid[0,4]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
270+
<location x="0" y="0"/>
271+
<height>0</height>
272+
<width>0</width>
273+
</widget>
274+
<widget field="DigitalInput[1]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
275+
<location x="0" y="0"/>
276+
<height>0</height>
277+
<width>0</width>
278+
</widget>
279+
<widget field="DigitalInput[1]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
280+
<location x="0" y="0"/>
281+
<height>0</height>
282+
<width>0</width>
283+
</widget>
284+
<widget field="Encoder[2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
285+
<location x="0" y="0"/>
286+
<height>0</height>
287+
<width>0</width>
288+
</widget>
289+
<widget field="Encoder[2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
290+
<location x="0" y="0"/>
291+
<height>0</height>
292+
<width>0</width>
293+
</widget>
294+
<widget field="Victor SPX [5]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
295+
<location x="0" y="0"/>
296+
<height>0</height>
297+
<width>0</width>
298+
</widget>
299+
<widget field="Victor SPX [5]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
300+
<location x="0" y="0"/>
301+
<height>0</height>
302+
<width>0</width>
303+
</widget>
304+
<widget field="DoubleSolenoid[0,0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
305+
<location x="0" y="0"/>
306+
<height>0</height>
307+
<width>0</width>
308+
</widget>
309+
<widget field="DoubleSolenoid[0,0]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
310+
<location x="0" y="0"/>
311+
<height>0</height>
312+
<width>0</width>
313+
</widget>
314+
<widget field="DigitalInput[2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
315+
<location x="0" y="0"/>
316+
<height>0</height>
317+
<width>0</width>
318+
</widget>
319+
<widget field="DigitalInput[2]" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
320+
<location x="0" y="0"/>
321+
<height>0</height>
322+
<width>0</width>
323+
</widget>
324+
<location x="8" y="22"/>
325+
<width>338</width>
326+
<height>974</height>
139327
</widget>
140328
<widget field="Lift" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
141-
<widget field="PIDController" type="PIDController" class="edu.wpi.first.smartdashboard.gui.elements.PIDEditor">
142-
<location x="6" y="16"/>
143-
<height>156</height>
144-
<width>293</width>
329+
<widget field="PIDController" type="Table" class="edu.wpi.first.smartdashboard.gui.elements.PIDEditor">
330+
<location x="0" y="0"/>
331+
<height>0</height>
332+
<width>0</width>
333+
</widget>
334+
<widget field="PIDController" type="Table" class="edu.wpi.first.smartdashboard.gui.elements.PIDEditor">
335+
<location x="0" y="0"/>
336+
<height>0</height>
337+
<width>0</width>
145338
</widget>
146-
<widget field="Encoder" type="Quadrature Encoder" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
147-
<location x="6" y="172"/>
148-
<height>98</height>
149-
<width>293</width>
339+
<widget field="Encoder" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
340+
<location x="0" y="0"/>
341+
<height>0</height>
342+
<width>0</width>
150343
</widget>
151-
<widget field="CIM Motor" type="Speed Controller" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
152-
<location x="6" y="270"/>
153-
<height>46</height>
154-
<width>293</width>
344+
<widget field="Encoder" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
345+
<location x="0" y="0"/>
346+
<height>0</height>
347+
<width>0</width>
348+
</widget>
349+
<widget field="CIM Motor" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
350+
<location x="0" y="0"/>
351+
<height>0</height>
352+
<width>0</width>
353+
</widget>
354+
<widget field="CIM Motor" type="Table" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
355+
<location x="0" y="0"/>
356+
<height>0</height>
357+
<width>0</width>
155358
</widget>
156359
<location x="31" y="11"/>
157360
<width>305</width>
158361
<height>323</height>
159362
</widget>
160-
<widget field="Climber" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
161-
<location x="23" y="3"/>
162-
</widget>
163-
<widget field="Ungrouped" type="LW Subsystem" class="edu.wpi.first.smartdashboard.livewindow.elements.LWSubsystem">
164-
<widget field="Encoder[1]" type="Quadrature Encoder" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
165-
<location x="6" y="16"/>
166-
<height>98</height>
167-
<width>326</width>
168-
</widget>
169-
<widget field="DoubleSolenoid[0,2]" type="Double Solenoid" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
170-
<location x="6" y="114"/>
171-
<height>20</height>
172-
<width>326</width>
173-
</widget>
174-
<widget field="DigitalInput[0]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
175-
<location x="6" y="134"/>
176-
<height>20</height>
177-
<width>326</width>
178-
</widget>
179-
<widget field="PowerDistributionPanel[0]" type="PowerDistributionPanel" class="edu.wpi.first.smartdashboard.livewindow.elements.PowerDistributionPanel">
180-
<location x="6" y="154"/>
181-
<height>195</height>
182-
<width>326</width>
183-
</widget>
184-
<widget field="VictorSP[8]" type="Speed Controller" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
185-
<location x="6" y="349"/>
186-
<height>46</height>
187-
<width>326</width>
188-
</widget>
189-
<widget field="Encoder[4]" type="Quadrature Encoder" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
190-
<location x="6" y="395"/>
191-
<height>98</height>
192-
<width>326</width>
193-
</widget>
194-
<widget field="VictorSP[9]" type="Speed Controller" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
195-
<location x="6" y="493"/>
196-
<height>46</height>
197-
<width>326</width>
198-
</widget>
199-
<widget field="DigitalInput[3]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
200-
<location x="6" y="539"/>
201-
<height>20</height>
202-
<width>326</width>
203-
</widget>
204-
<widget field="DigitalInput[5]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
205-
<location x="6" y="559"/>
206-
<height>20</height>
207-
<width>326</width>
208-
</widget>
209-
<widget field="DigitalInput[4]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
210-
<location x="6" y="579"/>
211-
<height>20</height>
212-
<width>326</width>
213-
</widget>
214-
<widget field="Talon SRX [6]" type="Speed Controller" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
215-
<location x="6" y="599"/>
216-
<height>46</height>
217-
<width>326</width>
218-
</widget>
219-
<widget field="Encoder[3]" type="Quadrature Encoder" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
220-
<location x="6" y="645"/>
221-
<height>98</height>
222-
<width>326</width>
223-
</widget>
224-
<widget field="DoubleSolenoid[0,4]" type="Double Solenoid" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
225-
<location x="6" y="743"/>
226-
<height>20</height>
227-
<width>326</width>
228-
</widget>
229-
<widget field="DigitalInput[1]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
230-
<location x="6" y="763"/>
231-
<height>20</height>
232-
<width>326</width>
233-
</widget>
234-
<widget field="Encoder[2]" type="Quadrature Encoder" class="edu.wpi.first.smartdashboard.livewindow.elements.EncoderDisplay">
235-
<location x="6" y="783"/>
236-
<height>98</height>
237-
<width>326</width>
238-
</widget>
239-
<widget field="Victor SPX [5]" type="Speed Controller" class="edu.wpi.first.smartdashboard.livewindow.elements.SpeedController">
240-
<location x="6" y="881"/>
241-
<height>46</height>
242-
<width>326</width>
243-
</widget>
244-
<widget field="DoubleSolenoid[0,0]" type="Double Solenoid" class="edu.wpi.first.smartdashboard.livewindow.elements.RelayController">
245-
<location x="6" y="927"/>
246-
<height>20</height>
247-
<width>326</width>
248-
</widget>
249-
<widget field="DigitalInput[2]" type="Digital Input" class="edu.wpi.first.smartdashboard.livewindow.elements.DigitalInputDisplay">
250-
<location x="6" y="947"/>
251-
<height>20</height>
252-
<width>326</width>
253-
</widget>
254-
<location x="8" y="22"/>
255-
<width>338</width>
256-
<height>974</height>
257-
</widget>
258363
</live-window>
259364
</xml>

Robot2018/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>RobotCode2018</name>
3+
<name>Robot2018</name>
44
<comment>Project RobotCode2018 created by Buildship.</comment>
55
<projects>
66
</projects>

Robot2018/src/main/java/org/usfirst/frc/team199/Robot2018/commands/IntakeCube.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ protected void initialize() {
2929
tim.reset();
3030
// tim.start();
3131
overDraw = false;
32+
Robot.stopIntake = false;
3233
}
3334

3435
// Called repeatedly when this Command is scheduled to run
@@ -52,14 +53,14 @@ protected void execute() {
5253
// Make this return true when this Command no longer needs to run execute()
5354
@Override
5455
protected boolean isFinished() {
55-
return tim.get() > Robot.getConst("Has Cube Timeout", 0.5) || Robot.stopIntake;
56+
return (tim.get() > Robot.getConst("Has Cube Timeout", 0.5)) || Robot.stopIntake;
5657
}
5758

5859
// Called once after isFinished returns true
5960
@Override
6061
protected void end() {
6162
Robot.intakeEject.stopIntake();
62-
Robot.stopIntake = false;
63+
Robot.stopIntake = true;
6364
if (Robot.robot.isAutonomous()) {
6465
Scheduler.getInstance().add(new LiftToPosition(Robot.lift, LiftHeight.SWITCH));
6566
}
@@ -69,5 +70,6 @@ protected void end() {
6970
// subsystems is scheduled to run
7071
@Override
7172
protected void interrupted() {
73+
end();
7274
}
7375
}

0 commit comments

Comments
 (0)