Skip to content

Commit 58f36f5

Browse files
Update Literal Actual Program
Cleaned it up of useless comments
1 parent 0ded0b6 commit 58f36f5

File tree

1 file changed

+0
-76
lines changed

1 file changed

+0
-76
lines changed

Literal Actual Program

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,6 @@
55
/* the project. */
66
/*----------------------------------------------------------------------------*/
77

8-
/*
9-
XBox
10-
Axis:
11-
Left Stick X = 1
12-
Left Stick Y = 2
13-
Left Trigger = 3
14-
Right Trigger = 4
15-
Right Stick X = 5
16-
Right Stick Y = 6
17-
18-
Button:
19-
A = 1
20-
B = 2
21-
X = 3
22-
Y = 4
23-
Left Trigger = 5
24-
Right Trigger = 6
25-
Options? = 7
26-
Start? = 8
27-
Left Stick = 9
28-
Right Stick = 10
29-
*/
308
#include <frc/Joystick.h>
319
#include <frc/TimedRobot.h>
3210
#include <frc/PWMVictorSPX.h>
@@ -159,57 +137,3 @@ class Robot : public frc::TimedRobot {
159137
#ifndef RUNNING_FRC_TESTS
160138
int main() { return frc::StartRobot<Robot>(); }
161139
#endif
162-
/*
163-
#include <frc/Joystick.h>
164-
#include <frc/PWMVictorSPX.h>
165-
#include <frc/TimedRobot.h>
166-
#include <frc/Timer.h>
167-
#include <frc/drive/DifferentialDrive.h>
168-
#include <frc/livewindow/LiveWindow.h>
169-
#include <frc/SpeedControllerGroup.h>
170-
#include <frc/DoubleSolenoid.h>
171-
#include <frc/Solenoid.h>
172-
#include <frc/Encoder.h>
173-
#include <frc/smartdashboard/SmartDashboard.h>
174-
175-
class Robot : public frc::TimedRobot {
176-
public:
177-
Robot() {
178-
forkLiftEncoder.SetSamplesToAverage(5);
179-
//Assuming 1 rotation = 100 cm and 1024 pulses per revolution
180-
forkLiftEncoder.SetDistancePerPulse(100/1024);
181-
forkLiftEncoder.SetMinRate(0);
182-
//Time in seconds before considered stop (i think??)
183-
forkLiftEncoder.SetMaxPeriod(1000.0);
184-
}
185-
void teleopInit() override {
186-
187-
};
188-
189-
void teleopPeriodic() override{
190-
if (gamePad.GetRawButton(0) == True) {
191-
while (forkLiftEncoder.GetDistance > 5) {
192-
m_forkLift.Set(.5);
193-
}
194-
} else if (gamePad.GetRawButton(0) == False){
195-
while (forkLiftEncoder.GetDistance < 0) {
196-
m_forkLift.Set(-.5);
197-
}
198-
}
199-
// Retrieve the displacement of first the Encoder
200-
frc::SmartDashboard::PutNumber("Encoder1 Distance: ", encoder1.GetDistance());
201-
202-
// Retrieve the current rate of the first encoder.
203-
// Rate = DistancePerPulse/Period
204-
frc::SmartDashboard::PutNumber("Encoder1 Rate cm/s: ", encoder1.GetRate());
205-
};
206-
private:
207-
frc::Joystick gamePad{0};
208-
frc::Encoder forkLiftEncoder{0, 1, false, frc::Encoder::k4X};
209-
frc::PWMVictorSPX m_forkLift{4};
210-
};
211-
212-
#ifndef RUNNING_FRC_TESTS
213-
int main() { return frc::StartRobot<Robot>(); }
214-
#endif
215-
*/

0 commit comments

Comments
 (0)