-
Notifications
You must be signed in to change notification settings - Fork 0
/
AngryBehaviour.cpp
37 lines (30 loc) · 1.16 KB
/
AngryBehaviour.cpp
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
/*
* AngryBehaviour.cpp
*
* Created on: 20.6.2016
* Author: kimmo
*/
#include "AngryBehaviour.h"
#include "Flash.h"
FLASH_TABLE(int, angrySequence, 5,
{LID_MIN_VALUE, ARM_MIN_VALUE, 20, 0, 0}, // initial position
{LID_MAX_VALUE, ARM_MIN_VALUE, 150, 100, 200}, // fast open, wait a bit
{LID_MIN_VALUE, ARM_MIN_VALUE, 20, 100, 500}, // slam shut, wait a bit
{LID_MAX_VALUE, ARM_MIN_VALUE, 150, 100, 1000}, // fast open, wait a bit longer
{LID_MIN_VALUE, ARM_MIN_VALUE, 20, 100, 500}, // slam shut, wait a bit
{LID_MAX_VALUE, ARM_MIN_VALUE, 150, 100, 0}, // fast open
{LID_MAX_VALUE, ARM_MAX_VALUE, 150, 100, 500}, // fast switch off
{LID_MAX_VALUE, ARM_MIN_VALUE, 150, 100, 200}, // hand back in
{LID_MIN_VALUE, ARM_MIN_VALUE, 20, 100, 500}, // slam shut
{LID_MIN_VALUE, ARM_MIN_VALUE, 0, 0, 0}, // lights off
{SEQ_END, SEQ_END, 0, 0, 0}
);
int AngryBehaviour::getSequenceValue(int step, int index) {
return angrySequence[step][index];
};
AngryBehaviour::AngryBehaviour() {
// TODO Auto-generated constructor stub
}
AngryBehaviour::~AngryBehaviour() {
// TODO Auto-generated destructor stub
}