7
7
8
8
#include <frc/Joystick.h>
9
9
#include <frc/TimedRobot.h>
10
+ #include <frc/Timer.h>
10
11
#include <frc/PWMVictorSPX.h>
11
12
#include <frc/drive/DifferentialDrive.h>
12
13
#include <frc/SpeedControllerGroup.h>
@@ -33,7 +34,7 @@ class Robot : public frc::TimedRobot {
33
34
//the else if statments is mostly likely unneeded, will test with and without so see if it is needed
34
35
// 3 = A button
35
36
if (xbox.GetRawButton(3) == 1) {
36
- Drive.ArcadeDrive(xbox.GetRawAxis(1) * -1 / 3 , xbox.GetRawAxis(0) / 3 );
37
+ Drive.ArcadeDrive(xbox.GetRawAxis(1) * -1 / 2 , xbox.GetRawAxis(0) / 2 );
37
38
} else if (xbox.GetRawButton(3) == 0) {
38
39
Drive.ArcadeDrive(xbox.GetRawAxis(1) * -1, xbox.GetRawAxis(0) / 2);
39
40
} else {
@@ -58,19 +59,20 @@ class Robot : public frc::TimedRobot {
58
59
s_HABback.Set(frc::DoubleSolenoid::kOff);
59
60
}
60
61
61
- //Forlift (Untested )
62
+ //Forlift (Works )
62
63
//POV is 0=UP 90=Right 180=Down 270=Left and 45 for all the angles
63
64
// the "== 1" might have to be "== 0/180" corresponcding to the angle
64
- if (arcadePad.GetPOV(0) == 1 ) {
65
+ if (arcadePad.GetPOV(0) == 0 ) {
65
66
m_forklift.Set(.5);
66
- } else if (arcadePad.GetPOV(180 ) == 1 ) {
67
+ } else if (arcadePad.GetPOV(0 ) == 180 ) {
67
68
m_forklift.Set(-.5);
68
69
} else {
69
70
m_forklift.Set(0);
70
71
}
71
72
72
73
//Ball Intake (Untested)
73
74
//This is the button test
75
+ // / 3 is to small need to change on next upload
74
76
// the / 3 is since one of the motors is currently missing a gearbox but we will have the gear box before comp
75
77
if (arcadePad.GetRawButton(1) == 1) {
76
78
m_leftIntake.Set(-1 / 3);
@@ -92,15 +94,25 @@ class Robot : public frc::TimedRobot {
92
94
//Hatch Panel Launcher(Works)
93
95
//4 = Y on Qanda Arcade
94
96
if (arcadePad.GetRawButton(4) == 1) {
95
- s_panelLauncherTop1 .Set(frc::DoubleSolenoid::kReverse );
96
- s_panelLauncherBottom2 .Set(frc::DoubleSolenoid::kReverse );
97
+ s_panelLauncher .Set(frc::DoubleSolenoid::kForward );
98
+ s_panelGetter .Set(frc::DoubleSolenoid::kForward );
97
99
} else if (arcadePad.GetRawButton(4) == 0) {
98
- s_panelLauncherTop1 .Set(frc::DoubleSolenoid::kForward );
99
- s_panelLauncherBottom2 .Set(frc::DoubleSolenoid::kForward );
100
+ s_panelLauncher .Set(frc::DoubleSolenoid::kReverse );
101
+ s_panelGetter .Set(frc::DoubleSolenoid::kReverse );
100
102
} else {
101
- s_panelLauncherBottom2 .Set(frc::DoubleSolenoid::kOff);
102
- s_panelLauncherTop1 .Set(frc::DoubleSolenoid::kOff);
103
+ s_panelLauncher .Set(frc::DoubleSolenoid::kOff);
104
+ s_panelGetter .Set(frc::DoubleSolenoid::kOff);
103
105
}
106
+ //Slider/Panel Getter(Untested)
107
+ /*
108
+ if (arcadePad.GetRawButton(6) == 1) {
109
+ s_panelGetter.Set(frc::DoubleSolenoid::kReverse);
110
+ } else if (arcadePad.GetRawButton(6) == 0) {
111
+ s_panelGetter.Set(frc::DoubleSolenoid::kForward);
112
+ } else {
113
+ s_panelGetter.Set(frc::DoubleSolenoid::kOff);
114
+ }
115
+ */
104
116
}
105
117
106
118
private:
@@ -128,8 +140,8 @@ class Robot : public frc::TimedRobot {
128
140
129
141
//Pneumatics/Solenoids
130
142
//Hatch Panel Launcher
131
- frc::DoubleSolenoid s_panelLauncherBottom2 {0, 1};
132
- frc::DoubleSolenoid s_panelLauncherTop1 {2, 3};
143
+ frc::DoubleSolenoid s_panelLauncher {0, 1};
144
+ frc::DoubleSolenoid s_panelGetter {2, 3};
133
145
frc::DoubleSolenoid s_HABfront{4, 5};
134
146
frc::DoubleSolenoid s_HABback{6, 7};
135
147
};
0 commit comments