-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlight.h
48 lines (34 loc) · 1.03 KB
/
light.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
#ifndef DIMMER
#define DIMMER
#include <Arduino.h>
#include "mqtt.h"
#include "wifi.h"
#include "config.h"
namespace light
{
// getter
uint8_t &getWattage();
void mqttCallback(const char* paramID, const char* payload);
void setMinBrightness(const char* str);
void setMaxBrightness(const char* str);
void setDimmingParameters(const char* dimmingTypeStr, const char* debounceStr);
void setBrightness(uint8_t b);
ICACHE_RAM_ATTR void lightOn(bool noLightAutoTurnOff=false);
ICACHE_RAM_ATTR void lightOff();
ICACHE_RAM_ATTR void lightToggle(bool noLightAutoTurnOff=false);
ICACHE_RAM_ATTR bool lightIsOn();
void STM32reset();
void sendCmdGetVersion();
void sendCmdGetState();
void setBlinkingDuration(const char* durationStr);
void setBlinkingPattern(const char *payload);
void startBlinking();
void stopBlinking();
void setup();
void handle();
void updateParams();
void addWifiManagerCustomButtons();
void addWifiManagerCustomParams();
void bindServerCallback();
} // namespace dimmer
#endif