-
Notifications
You must be signed in to change notification settings - Fork 0
/
LedCycle.h
52 lines (36 loc) · 1.02 KB
/
LedCycle.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
/*
* LedCycle.h
*/
#ifndef LED_CYCLE_H
#define LED_CYCLE_H
#include "Time.h"
class LedCycle {
public:
LedCycle ();
LedCycle(time_t startTime,
time_t fadeInTime,
time_t stopTime,
time_t fadeOutTime);
uint8_t getOutputPercent(time_t _currentTime);
void setStartTime(time_t _startTime);
time_t getStartTime() const {return startTime;}
void setFadeInTime(time_t _fadeInTime);
time_t getFadeInTime() const {return fadeInTime;}
void setStopTime(time_t _stopTime);
time_t getStopTime() const {return stopTime;}
void setFadeOutTime(time_t _fadeOutTime);
time_t getFadeOutTime() const {return fadeOutTime;}
void applyDefaultTime ();
bool setEepromStartAddress(uint8_t _address);
uint8_t getEepromStartAddress() const {return eepromAddress;}
bool loadEepromDatas();
void saveEepromDatas();
protected:
time_t startTime, fadeInTime, stopTime, fadeOutTime;
uint8_t eepromAddress;
bool isLedFullOn, isLedOff;
};
#endif // LED_CYCLE_H
/*
* End of file LedCycle.h
*/