-
Notifications
You must be signed in to change notification settings - Fork 0
/
Robot.hpp
66 lines (51 loc) · 1.4 KB
/
Robot.hpp
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
/*
* Robot.hpp
*
* Created on: Feb 7, 2017
* Author: team
*/
#ifndef SRC_ROBOT_HPP_
#define SRC_ROBOT_HPP_
#include <iostream>
#include <memory>
#include <string>
#include "WPILib.h"
class Robot: public frc::IterativeRobot {
private:
RobotDrive drive;
Joystick stickojoy;
frc::LiveWindow* lw = LiveWindow::GetInstance();
frc::SendableChooser<std::string> chooser;
const std::string autoNameDefault = "Default";
const std::string autoNameCustom = "My Auto";
std::string autoSelected;
public:
Robot();
void RobotInit();
/*
* This autonomous (along with the chooser code above) shows how to select
* between different autonomous modes using the dashboard. The sendable
* chooser code works with the Java SmartDashboard. If you prefer the
* LabVIEW Dashboard, remove all of the chooser code and uncomment the
* GetString line to get the auto name from the text box below the Gyro.
*
* You can add additional auto modes by adding additional comparisons to the
* if-else structure below with additional strings. If using the
* SendableChooser make sure to add them to the chooser code above as well.
*/
void AutonomousInit();
void AutonomousPeriodic();
void TeleopInit();
void TeleopPeriodic();
void TestPeriodic();
};
namespace utils{
double removeGhost(double ghost){
if(ghost<.15&&ghost>-.15){
return 0.0;
}else{
return ghost;
}
}
}
#endif /* SRC_ROBOT_HPP_ */