Skip to content

Commit f1c0705

Browse files
Update Literal Actual Program
1 parent 58f36f5 commit f1c0705

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

Literal Actual Program

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <frc/Joystick.h>
99
#include <frc/TimedRobot.h>
10+
#include <frc/Timer.h>
1011
#include <frc/PWMVictorSPX.h>
1112
#include <frc/drive/DifferentialDrive.h>
1213
#include <frc/SpeedControllerGroup.h>
@@ -33,7 +34,7 @@ class Robot : public frc::TimedRobot {
3334
//the else if statments is mostly likely unneeded, will test with and without so see if it is needed
3435
// 3 = A button
3536
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);
3738
} else if (xbox.GetRawButton(3) == 0) {
3839
Drive.ArcadeDrive(xbox.GetRawAxis(1) * -1, xbox.GetRawAxis(0) / 2);
3940
} else {
@@ -58,19 +59,20 @@ class Robot : public frc::TimedRobot {
5859
s_HABback.Set(frc::DoubleSolenoid::kOff);
5960
}
6061

61-
//Forlift (Untested)
62+
//Forlift (Works)
6263
//POV is 0=UP 90=Right 180=Down 270=Left and 45 for all the angles
6364
// the "== 1" might have to be "== 0/180" corresponcding to the angle
64-
if (arcadePad.GetPOV(0) == 1) {
65+
if (arcadePad.GetPOV(0) == 0) {
6566
m_forklift.Set(.5);
66-
} else if (arcadePad.GetPOV(180) == 1) {
67+
} else if (arcadePad.GetPOV(0) == 180) {
6768
m_forklift.Set(-.5);
6869
} else {
6970
m_forklift.Set(0);
7071
}
7172

7273
//Ball Intake (Untested)
7374
//This is the button test
75+
// / 3 is to small need to change on next upload
7476
// the / 3 is since one of the motors is currently missing a gearbox but we will have the gear box before comp
7577
if (arcadePad.GetRawButton(1) == 1) {
7678
m_leftIntake.Set(-1 / 3);
@@ -92,15 +94,25 @@ class Robot : public frc::TimedRobot {
9294
//Hatch Panel Launcher(Works)
9395
//4 = Y on Qanda Arcade
9496
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);
9799
} 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);
100102
} 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);
103105
}
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+
*/
104116
}
105117

106118
private:
@@ -128,8 +140,8 @@ class Robot : public frc::TimedRobot {
128140

129141
//Pneumatics/Solenoids
130142
//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};
133145
frc::DoubleSolenoid s_HABfront{4, 5};
134146
frc::DoubleSolenoid s_HABback{6, 7};
135147
};

0 commit comments

Comments
 (0)