-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPersistentWarnRadiation.cpp
More file actions
44 lines (37 loc) · 976 Bytes
/
PersistentWarnRadiation.cpp
File metadata and controls
44 lines (37 loc) · 976 Bytes
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
/** Persistent command to blink the Radiation
* Indicator when the robot is carrying an
* exposed rod
* @author Jordan Burklund
* @date Oct. 2015
**/
#include "PersistentWarnRadiation.h"
PersistentWarnRadiation::PersistentWarnRadiation(Robot *robot, RadiationIndicator *radInd) {
_robot = robot;
_radInd = radInd;
}
/** Do nothing for initialization. Assumes
* the RadiationIndicator is already initialized
**/
void PersistentWarnRadiation::initialize() {
}
/** Check if the LED should be blinking, and update its
* state.
**/
void PersistentWarnRadiation::execute() {
if(_robot->getRadLevel() == RAD_LEVEL_NEW || _robot->getRadLevel() == RAD_LEVEL_SPENT) {
_radInd->setBlink();
} else {
_radInd->setNotBlink();
}
_radInd->update();
}
/** No final clean up to do
**/
void PersistentWarnRadiation::end() {
}
/** Since this command is persistent, it is
* never finished
**/
bool PersistentWarnRadiation::isFinished() {
return false;
}