-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSMBackDoor.h
executable file
·48 lines (39 loc) · 913 Bytes
/
SMBackDoor.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
#ifndef _HDR_SM_BACK_DOOR_
#define _HDR_SM_BACK_DOOR_
#include "StateMachine.h"
#include "Controller.h"
typedef unsigned long uint32;
class SMBackDoor :
public StateMachine
{
public:
SMBackDoor(Controller *p);
virtual ~SMBackDoor();
void init();
void run();
void Timer1sec(); // 1 second timer entry point
void Timer1ms(); // 1 ms timer entry point
int getState();
protected:
void setState(int s) {
_c_state=s;
};
private:
unsigned int _c_state;
Switch *pThermalDetector1;
Switch *pThermalDetector2;
Switch *pThermalDetector3;
Relay *pBackDeckLight;
Relay *pFloodLight1;
Relay *pFloodLight2;
Relay *pGardenLights;
uint32 _on_timer; // count down timer
uint32 _off_timer; // count up timer
uint32 _retrigger_timer; // countdown timer
uint32 _retrig_value; // 60 sec
uint32 _on_timer_value; // time to turn on by 60s
};
#endif
/*
* end of file
*/