-
Notifications
You must be signed in to change notification settings - Fork 4
/
AbstractDFWRobot.h
59 lines (53 loc) · 1.34 KB
/
AbstractDFWRobot.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
/*
* AbstractDFWRobot.h
*
* Created on: Aug 23, 2017
* Author: hephaestus
*/
#ifndef LIBRARIES_DFW_ABSTRACTDFWROBOT_H_
#define LIBRARIES_DFW_ABSTRACTDFWROBOT_H_
#include "DFW.h"
class AbstractDFWRobot{
public:
/**
* Called when the start button is pressed and the robot control begins
*/
virtual void robotStartup()=0;
/**
* Called by the controller between communication with the wireless controller
* during autonomous mode
* @param time the amount of time remaining
* @param dfw instance of the DFW controller
*/
virtual void autonomous( long time)=0;
/**
* Called by the controller between communication with the wireless controller
* during teleop mode
* @param time the amount of time remaining
* @param dfw instance of the DFW controller
*/
virtual void teleop( long time)=0;
/**
* Called at the end of control to reset the objects for the next start
*/
virtual void robotShutdown(void)=0;
/**
* Return the number of the LED used for controller signaling
*/
virtual int getDebugLEDPin(void)=0;
};
class DymmyDFWRobot:public AbstractDFWRobot{
int ledNum=13;
public:
DymmyDFWRobot(int num){
ledNum=num;
}
void robotStartup(){}
void autonomous( long){};
void teleop( long){};
void robotShutdown(void){};
int getDebugLEDPin(void){
return ledNum;
};
};
#endif /* LIBRARIES_DFW_ABSTRACTDFWROBOT_H_ */