-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2018.java
More file actions
626 lines (558 loc) · 19.5 KB
/
2018.java
File metadata and controls
626 lines (558 loc) · 19.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
package org.usfirst.frc.team6632.robot;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.buttons.*;
import edu.wpi.first.wpilibj.livewindow.*;
import edu.wpi.first.wpilibj.smartdashboard.*;
import com.kauailabs.navx.frc.*;
public class Robot extends IterativeRobot
{
@SuppressWarnings("deprecation")
RobotDrive myRobot;
AHRS gyro;
//Speed controllers for drive motors
VictorSP vspFrontLeft, vspRearLeft, vspFrontRight, vspRearRight;
//Joystick variables
Joystick joyController1;
JoystickButton joyButtonA, joyButtonB, joyButtonX, joyButtonY, joyButtonStart, joyButtonLB, joyButtonRB;
//Speed controllers for climb motors
Spark climbMotor1, climbMotor2;
PowerDistributionPanel pdp;
//Drive speed info
private double currentVelocity = 0.0d;
private double targetVelocity = 0.0d;
private long lastLoopTime = 0;
//Pneumatics
private Solenoid cubeIn, cubeOut;
private Solenoid clawOpen, clawClose;
private Solenoid clawRaise, clawLower;
private boolean cubePush = false;
private boolean clawGrab = false;
private boolean clawButtonPressed = false;
private long clawButtonPressTime = 0;
private boolean clawRaised = false;
private boolean clawRaisePressed = false;
private long clawRaisePressTime = 0;
private long cubeOutTime = 0;
private long cubeButtonPressTime = 0;
private boolean cubeButtonPressed = false;
//Current state (driver, autonMode)
private int currentDriver = 0;
private int autonState = 0;
private byte autonMode = 1;
private byte mode = 0; //710
private String fmsGameData;
private double currentAngle;
private int sideState = 0;
// bounce, dBounce, cubePush and clawGrab variables are to prevent constant input of buttons
// just press the button once, trigger the event; if button is held, event does
// not continue to get triggered
private boolean bounce; // auton selection
private boolean dBounce = true; // for drivers
private long autonStartTime;
public static final String BASELINE = "Baseline";
public static final String SWITCH_CENTRE = "Switch_Centre";
public static final String SWITCH_RIGHT = "Switch_Right";
public static final String SWITCH_LEFT = "Switch_Left";
public static String autoMode = SWITCH_CENTRE;
/////////////////////////////////////////////////////////////////////////////////////
//1. ROBOT INITIALISATION -----------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////
private void initSparks() {
climbMotor1 = new Spark(5);
climbMotor2 = new Spark(4);
}
@SuppressWarnings("deprecation")
private void initDriveVSPs() {
vspFrontLeft = new VictorSP(6); //blue
vspRearLeft = new VictorSP(7); //purple
vspFrontRight = new VictorSP(8); //gray
vspRearRight = new VictorSP(9); //white
vspRearRight.setInverted(true);
vspFrontRight.setInverted(true);
vspRearLeft.setInverted(false); //true on main bot, false on test
vspFrontLeft.setInverted(false); //true on main bot, false on test
myRobot = new RobotDrive(vspFrontLeft, vspRearLeft, vspFrontRight, vspRearRight);
myRobot.setSensitivity(0.3);
}
private void initController() {
joyController1 = new Joystick(0);
joyButtonA = new JoystickButton(joyController1, 1);
joyButtonB = new JoystickButton(joyController1, 2);
joyButtonX = new JoystickButton(joyController1, 3);
joyButtonY = new JoystickButton(joyController1, 4);
joyButtonStart = new JoystickButton(joyController1, 8);
joyButtonLB = new JoystickButton(joyController1, 5);
joyButtonRB = new JoystickButton(joyController1, 6);
}
private void initPnuematics() {
cubeIn = new Solenoid(5);
cubeOut = new Solenoid(4);
clawOpen = new Solenoid(0);
clawClose = new Solenoid(1);
clawRaise = new Solenoid(2);
clawLower = new Solenoid(3);
}
private void initCamera() {
CameraServer.getInstance().startAutomaticCapture();
}
public void robotInit() {
initSparks();
initDriveVSPs();
initController();
initPnuematics();
initCamera();
gyro = new AHRS(SerialPort.Port.kMXP);
currentAngle = gyro.getAngle();
pdp = new PowerDistributionPanel();
}
/////////////////////////////////////////////////////////////////////////////////////
//2. AUTONOMOUS MODE ----------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////
public void autonomousInit() {
autonStartTime = System.currentTimeMillis();
fmsGameData = DriverStation.getInstance().getGameSpecificMessage();
currentAngle = gyro.getAngle();
autonState = 0;
sideState = 0;
}
public void switchAutonStatesCenter(int state, char c) {
if(c == 'L') {
switch(state) {
case 1:
currentAngle -= 45;
break;
case 3:
currentAngle += 45;
break;
}
} else if(c == 'R') {
switch(state) {
case 1:
currentAngle += 45;
break;
case 3:
currentAngle -= 45;
break;
}
}
}
public void switchAutonStatesSide(int state, char c) {
if(c == 'L') {
switch(state) {
case 1:
currentAngle -= 45;
break;
case 3:
currentAngle += 45;
break;
}
} else if(c == 'R') {
switch(state) {
case 1:
currentAngle += 45;
break;
case 3:
currentAngle -= 45;
break;
}
}
}
public void switchAutonStatesLeft(int state, char c) {
switch(state) {
case 1:
currentAngle -= 45;
break;
case 3:
currentAngle += 45;
break;
}
}
private double getTurnAmount() {
double turnAmount = (currentAngle - gyro.getAngle()) * 0.02d;
if(Math.abs(turnAmount) < 0.04d) {
turnAmount = 0.0d;
}
if(turnAmount > 0.5d) {
turnAmount = 0.5d;
}
if(turnAmount < -0.5d) {
turnAmount = -0.5d;
}
return turnAmount;
}
public void autonomousPeriodic() {
boolean mySwitch = false;
boolean myScale = false;
checkAutonState();
while(fmsGameData.length() == 0) {
fmsGameData = DriverStation.getInstance().getGameSpecificMessage();
}
//////////////CHECKS IF SWITCH BELONGS TO US////////////
if(autoMode.equals(SWITCH_CENTRE)) {
mySwitch = true;
}if(autoMode.equals(SWITCH_LEFT) && fmsGameData.charAt(0)=='L'){
mySwitch = true;
}if(autoMode.equals(SWITCH_RIGHT) && fmsGameData.charAt(0)=='R'){
mySwitch = true;
}
//////////////CHECKS IF SCALE BELONGS TO US////////////
if(autoMode.equals(SWITCH_LEFT) && fmsGameData.charAt(1)=='L'){
myScale = true;
}if(autoMode.equals(SWITCH_RIGHT) && fmsGameData.charAt(1)=='R'){
myScale = true;
}
///////////////END CHECK////////////////////////
///////////////ACTUAL AUTO CODE/////////////
//NOTE AS OF RN SWITCH_LEFT and SWITCH RIGHT ARE THE SAME, EXCEPT FOR THE ANGLE; IT GOES FROM +/-45 to +/-45
if(autoMode.equals(BASELINE)) {
if(System.currentTimeMillis() - autonStartTime < 3000) {
myRobot.arcadeDrive(-0.5d, 0, false);
}else if(System.currentTimeMillis() - autonStartTime < 4000) {
myRobot.arcadeDrive(-0.1d, 0, false);
}
}else if(autoMode.equals(SWITCH_LEFT)) {//Drives Straight, stops; checks if switch belongs to us then delivers; else SCALLEES
if(System.currentTimeMillis() - autonStartTime < 2200) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 2500) {
myRobot.arcadeDrive(0.0d, 0, false);
}
else if(mySwitch){
if(System.currentTimeMillis() - autonStartTime < 3500) {
if(sideState == 0){
currentAngle+=45;
sideState = 1;
}
myRobot.arcadeDrive(-0.0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 5000) {
if(sideState == 1){
currentAngle+=45;
sideState = 2;
}
myRobot.arcadeDrive(-0.0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 6000) {
myRobot.arcadeDrive(-0.5d, 0, false);
}else if(System.currentTimeMillis() - autonStartTime < 6100) {
myRobot.arcadeDrive(0.0d, 0, false);
setClawGrab(true);
}else{
setCubeOut(true);
}
}
else if(myScale){
if(System.currentTimeMillis() - autonStartTime < 4800) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 6000) {
if(sideState == 0){
currentAngle+=45;
sideState = 1;
}
myRobot.arcadeDrive(0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 7000) {
if(sideState == 1){
currentAngle+=45;
sideState = 2;
}
myRobot.arcadeDrive(0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 9000) {
myRobot.arcadeDrive(-0.0d, 0, false);
climbMotor1.setSpeed(1);
climbMotor2.setSpeed(-1);
}else if(System.currentTimeMillis() - autonStartTime < 9100) {
climbMotor1.setSpeed(0.15);
climbMotor2.setSpeed(-0.15);
myRobot.arcadeDrive(0.0d, 0, false);
if(myScale) {
setClawGrab(true);
}
}else{
if(myScale) {
setCubeOut(true);
}
}
}
}else if(autoMode.equals(SWITCH_RIGHT)) {//Drives Straight, stops; checks if switch belongs to us then delivers; else SCALEEEES
if(System.currentTimeMillis() - autonStartTime < 2200) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 2500) {
myRobot.arcadeDrive(0.0d, 0, false);
}
else if(mySwitch){
if(System.currentTimeMillis() - autonStartTime < 3500) {
if(sideState == 0){
currentAngle-=45;
sideState = 1;
}
myRobot.arcadeDrive(-0.0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 5000) {
if(sideState == 1){
currentAngle-=45;
sideState = 2;
}
myRobot.arcadeDrive(-0.0d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 6000) {
myRobot.arcadeDrive(-0.5d, 0, false);
}else if(System.currentTimeMillis() - autonStartTime < 6100) {
myRobot.arcadeDrive(0.0d, 0, false);
setClawGrab(true);
}else{
setCubeOut(true);
}
}
else if(myScale){
if(System.currentTimeMillis() - autonStartTime < 5000) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 6000) {
if(sideState == 0){
currentAngle-=45;
sideState = 1;
}
myRobot.arcadeDrive(-0.1d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 7000) {
if(sideState == 1){
currentAngle-=45;
sideState = 2;
}
myRobot.arcadeDrive(-0.1d, getTurnAmount(), false);
}else if(System.currentTimeMillis() - autonStartTime < 9000) {
myRobot.arcadeDrive(-0.0d, 0, false);
climbMotor1.setSpeed(1);
climbMotor2.setSpeed(-1);
}else if(System.currentTimeMillis() - autonStartTime < 9100) {
climbMotor1.setSpeed(0.15);
climbMotor2.setSpeed(-0.15);
myRobot.arcadeDrive(0.0d, 0, false);
if(myScale) {
setClawGrab(true);
}
}else{
if(myScale) {
setCubeOut(true);
}
}
}
}else{//DEFAULT CENTRE AUTO
if(System.currentTimeMillis() - autonStartTime < 300) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);//Drive straight and compensate
SmartDashboard.putString("DB/String 3", "1");
} else if(System.currentTimeMillis() - autonStartTime < 1000) {
myRobot.arcadeDrive(0d, 0.0d, false);//Stop
SmartDashboard.putString("DB/String 3", "2");
} else if(System.currentTimeMillis() - autonStartTime < 3000) {
if(autonState < 1) {//set turn amount and increment stage
autonState = 1;
switchAutonStatesCenter(1, fmsGameData.charAt(0));
}
myRobot.arcadeDrive(-0.25d, getTurnAmount(), false);
SmartDashboard.putString("DB/String 3", "2");
} else if(System.currentTimeMillis() - autonStartTime < 3600) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
SmartDashboard.putString("DB/String 3", "3");
} else if(System.currentTimeMillis() - autonStartTime < 4000) {
myRobot.arcadeDrive(0d, 0.0d, false);
SmartDashboard.putString("DB/String 3", "3");
} else if(System.currentTimeMillis() - autonStartTime < 6000) {
if(autonState < 3) {
autonState = 3;
switchAutonStatesCenter(3, fmsGameData.charAt(0));
}
myRobot.arcadeDrive(-0.25d, getTurnAmount(), false);
SmartDashboard.putString("DB/String 3", "4");
} else if(System.currentTimeMillis() - autonStartTime < 6800) {
myRobot.arcadeDrive(-0.5d, getTurnAmount(), false);
SmartDashboard.putString("DB/String 3", "5");
} else if(System.currentTimeMillis() - autonStartTime < 6900) {
myRobot.arcadeDrive(0,0, false);
setClawGrab(true);
} else {
setCubeOut(true);
}
}
SmartDashboard.putString("DB/String 1", ""+gyro.getAngle());
SmartDashboard.putString("DB/String 2", ""+currentAngle);
}
public void teleopInit() {
lastLoopTime = System.currentTimeMillis();
}
/////////////////////////////////////////////////////////////////////////////////////
//3. TELEOP MODE -------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////////////
private void toggleClawRaised() {
clawRaised = !clawRaised;
setClawRaised(clawRaised);
}
private void setClawRaised(boolean b) {
clawRaisePressTime = System.currentTimeMillis();
clawRaised = b;
clawRaise.set(clawRaised);
clawLower.set(!clawRaised);
}
private void checkClawRaiseButton(JoystickButton b) {
if(b.get() && !clawRaisePressed && (System.currentTimeMillis() - clawRaisePressTime) > 200) {
clawRaisePressed = true;
toggleClawRaised();
} else if(!b.get()) {
clawRaisePressed = false;
}
}
private void toggleClawGrab() {
clawGrab = !clawGrab;
setClawGrab(clawGrab);
}
private void setClawGrab(boolean b) {
clawButtonPressTime = System.currentTimeMillis();
clawGrab = b;
clawOpen.set(!clawGrab);
clawClose.set(clawGrab);
}
private void checkClawGrabButton(JoystickButton b) {
if(b.get() && !clawButtonPressed && (System.currentTimeMillis() - clawButtonPressTime) > 200) {
clawButtonPressed = true;
toggleClawGrab();
} else if(!b.get()) {
clawButtonPressed = false;
}
}
private void setCubeOut(boolean b) {
cubeOut.set(!b);
cubeIn.set(b);
cubeOutTime = System.currentTimeMillis();
}
private void checkCubeEjectButton(JoystickButton b) {
if(b.get() && !cubeButtonPressed) {
cubeButtonPressed = true;
clawButtonPressTime = System.currentTimeMillis();
cubeButtonPressTime = System.currentTimeMillis();
setClawGrab(true);
} else if(!b.get()) {
cubeButtonPressed = false;
}
}
private void checkCubeEjectReady() {
if(System.currentTimeMillis() - cubeButtonPressTime > 100 && System.currentTimeMillis() - cubeButtonPressTime < 500) {
setCubeOut(true);
}
}
private void checkCubeEjectTimeout() {
if(System.currentTimeMillis() - cubeOutTime > 500) {
setCubeOut(false);
}
}
private void setClimbMotors() {
if(joyButtonLB.get()) {//down
climbMotor1.setSpeed(-.8);
climbMotor2.setSpeed(.8);
}
else if(joyButtonRB.get()) {//up
climbMotor1.setSpeed(1);
climbMotor2.setSpeed(-1);
}
else {//stay
climbMotor1.setSpeed(0.15);
climbMotor2.setSpeed(-0.15);
}
if(joyButtonY.get()){//down fast
climbMotor1.setSpeed(-1);
climbMotor2.setSpeed(1);
}
}
private void runDriveMotors() {
//input collection
/* axisInputs[0] is the forwards values, range [-1, 1]
axisInputs[1] is the rotation value, range [-1, 1]
axisInputs[2] is the drive power (speed), range [0, 1]
axisInputs[3] is the climb power (speed), range [0, 1]*/
double[] axisInputs = new double[4];
/* There are multiple drivers
data for axisInputs comes from a joy-stick axis
the axis number is given in this array*/
final int[][] driverAxisInputMaps = {
{ 1, 4, 2, 3 },
{ 1, 4, 2, 3 }
};
for(int i = 0; i < driverAxisInputMaps[currentDriver].length; i++) {
axisInputs[i] = joyController1.getRawAxis(driverAxisInputMaps[currentDriver][i]);
}
//calculate robot motor output power
//There is a base threshold power that is active when the trigger is not pressed
final double baseThresholdPower = 0.4;
//Calculate drive speed by taking the max of the absolute values of the forward speed and the turn speed
//this is to prevent the robot from not turning due to too low an input speed
//final double baseTurnPower = 0.3d;
//double maxTurnPower = Math.abs(currentVelocity) * (baseTurnPower - 1.0d) + 1.0d;
double baseTurnPower = 0.5d;
double turnAmount = axisInputs[1];//(baseTurnPower + ((1.0d - baseTurnPower) * axisInputs[2])) * axisInputs[1];
//.6 * axisInputs[1] * (baseThresholdPower + ((1.0d - baseThresholdPower) * axisInputs[2]));
//double robotDriveValue = Math.max(Math.abs(axisInputs[0]), Math.abs(turnAmount)) * Math.signum(axisInputs[0]);
targetVelocity = (baseThresholdPower + ((1.0d - baseThresholdPower) * axisInputs[2])) * axisInputs[0];
//myRobot.setMaxOutput(baseThresholdPower + (1.0d - baseThresholdPower) * axisInputs[2]);
long loopDelta = System.currentTimeMillis() - lastLoopTime;
lastLoopTime = System.currentTimeMillis();
final double driveScaleValue = 0.005d;
if(Math.abs(targetVelocity - currentVelocity) < 0.05d) {
} else if(targetVelocity > currentVelocity) {
currentVelocity += driveScaleValue * loopDelta;
} else if(targetVelocity < currentVelocity) {
currentVelocity -= driveScaleValue * loopDelta;
}
myRobot.arcadeDrive(currentVelocity, turnAmount, false);
SmartDashboard.putString("DB/String 5", ""+pdp.getCurrent(0));
SmartDashboard.putString("DB/String 6", ""+pdp.getCurrent(1));
SmartDashboard.putString("DB/String 7", ""+pdp.getCurrent(2));
SmartDashboard.putString("DB/String 8", ""+pdp.getCurrent(3));
SmartDashboard.putString("DB/String 9", ""+pdp.getCurrent(13));
}
public void teleopPeriodic() {
runDriveMotors();
setClimbMotors();
//Pnuematics, you can change piston button configuration here
checkClawGrabButton(joyButtonX);
checkCubeEjectButton(joyButtonB);
checkClawRaiseButton(joyButtonA);
checkCubeEjectReady();
checkCubeEjectTimeout();
SmartDashboard.putString("DB/String 1", ""+gyro.getAngle());
SmartDashboard.putString("DB/String 2", ""+currentAngle);
}
public void testPeriodic()
{
LiveWindow.run();
}
public void disabledInit(){
}
///////////////////////////////////////////////////////////////////////////////
//4. DISABLED PERIODIC---------------------------------------------------------
///////////////////////////////////////////////////////////////////////////////
public void disabledPeriodic()
{
checkAutonState();
}
public void autonomousDisabled() {
checkAutonState();
}
public void checkAutonState(){
/*if(SmartDashboard.getBoolean("DB/Button 1", true)){
SmartDashboard.putString("DB/String 4", "CENTRE AUTO");
autoMode = SWITCH_CENTRE;
}
else{
SmartDashboard.putString("DB/String 4", "BASELINE AUTO");
autoMode = BASELINE;
}*/
if(SmartDashboard.getBoolean("DB/Button 1", true)){
SmartDashboard.putString("DB/String 4", "Left Priority SWITCH");
autoMode = SWITCH_LEFT;
}
else if(SmartDashboard.getBoolean("DB/Button 2", true)){
SmartDashboard.putString("DB/String 4", "Centre SWITCH AUTO");
autoMode = SWITCH_CENTRE;
}
else if(SmartDashboard.getBoolean("DB/Button 3", true)){
SmartDashboard.putString("DB/String 4", "Right Priority SWITCH");
autoMode = SWITCH_RIGHT;
}
else if (!((SmartDashboard.getBoolean("DB/Button 1", true) && SmartDashboard.getBoolean("DB/Button 2", true)) && SmartDashboard.getBoolean("DB/Button 3", true))){
SmartDashboard.putString("DB/String 4", "Baseline AUTO");
autoMode = BASELINE;
}
}
}