-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCatapult.h
49 lines (40 loc) · 988 Bytes
/
Catapult.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
#ifndef CATAPULT_H
#define CATAPULT_H
#include "WPILib.h"
#include "Controllers.h"
#include "Feeder.h"
class Catapult
{
public:
Catapult(Controllers* driverInput, Feeder* feeder, int catapaultPWM, int limitSwitch, int red, int blue);
enum CATAPULT_STATE{
CATAPULT_STATE_ARM = 0,
CATAPULT_STATE_FIRE = 1,
CATAPULT_STATE_ARMED = 2,
CATAPULT_STATE_FIRING = 3
};
void Catapult::SetSafeToFire(bool safeFire);
void Catapult::GetInputs();
void Catapult::ExecStep(void);
void Catapult::SetOutputs();
void SetState(CATAPULT_STATE state);
Feeder* GetFeeder();
Victor* ChooChooMotor;
private:
bool CommandToFire;
bool SafeCommandToFire;
bool SafeToFire;
int FireTickCount;
float ChooChooMotorSpeed;
bool CatapultArmed;
int catapultInput;
float MaxChooChooMotorSpeed;
Timer* timer;
bool Flashing;
CATAPULT_STATE catapultState;
Controllers* driverInput;
DigitalInput* LimitSwitch;
Timer* lighttimer;
Feeder* feeder;
};
#endif /* CATAPULT_H */