-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfollower.h
30 lines (28 loc) · 909 Bytes
/
follower.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
#ifndef FOLLOWER_H
#define FOLLOWER_H
#include "relay.h"
class Follower: public Relay
{
public:
Follower(uint8_t id, uint8_t board, uint8_t relay,uint8_t master, uint16_t delayOn, uint16_t delayOff);
Follower(uint8_t id, unsigned char *initData);
virtual ~Follower();
virtual void printInfo();
virtual void notify(uint8_t device, bool on);
virtual char *getTypeName() {return "Follower";};
virtual void printDefinition(uint8_t first);
virtual bool isType(enum DeviceType type);
virtual void loop();
protected:
virtual uint8_t saveConfig(unsigned char *initData);
private:
void init();
uint8_t _master;
uint16_t _delayOn;
uint16_t _delayOff;
unsigned long _onRequest;
unsigned long _offRequest;
uint8_t _waitingForOn;
uint8_t _waitingForOff;
};
#endif