-
Notifications
You must be signed in to change notification settings - Fork 0
/
TinMan.h
71 lines (50 loc) · 1.39 KB
/
TinMan.h
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
#ifndef TinMan_h
#define TinMan_h
#include "WPILib.h"
#include "RobotDefines.h"
//******************************************************************************
//******************************************************************************
class TinMan : public SimpleRobot
{
public:
//*** constructor ***
TinMan(void);
//*** autonomous mode code ***
void Autonomous(void);
//*** teleop code ***
void OperatorControl(void);
//*** test mode ***
void Test(void);
protected:
//*** variables ***
RobotDrive *drive; // robot drive system
Joystick *stick; // only joystick
//*** methods ***
//*** drive the robot ***
void handleDriving();
//*** handle joystick buttons ***
void handleJoystickButtons();
//*** handle limit switches ***
void handleLimitSwitches();
//*** joystick button states ***
bool isRampDownActivated();
bool isRampUpActivated();
bool isReadConfigActivated();
bool isShootBallActivated();
bool isToggleBallMoveActivated();
bool isReverseBallMoveActivated();
//*** joystick button handlers ***
void doRampDown();
void doRampUp();
void doReadConfig();
void doShootBall();
void doToggleBallMove();
void doReverseBallMove();
//*** limit switch states ***
bool isShooterReadySwitchActivated();
bool isRampUpSwitchActivated();
//*** limit switch handlers ***
void handleShooterReadyActivated();
void handleRampUpActivated();
};
#endif