добавляет HALightColorTemperatureBrightness
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
#include <ESP8266WiFi.h>
|
||||
#include <IRremoteESP8266.h>
|
||||
#include <IRsend.h>
|
||||
#include <HALightBrightness.hpp>
|
||||
#include <HALightColorTemperatureBrightness.hpp>
|
||||
|
||||
class IRLight: public HALightBrightnessController {
|
||||
class IRLight: public HALightColorTemperatureBrightnessController {
|
||||
private:
|
||||
bool state;
|
||||
short brightness;
|
||||
byte color_temp;
|
||||
|
||||
IRsend *irsend;
|
||||
|
||||
@@ -28,7 +29,7 @@ private:
|
||||
680, 470, 580, 1620, 630, 470, 630, 1570, 630, 520, 580, 520,
|
||||
630, 1570, 680, 1520, 730, 1520, 680};
|
||||
|
||||
const uint16_t RDCentralButton[67] = {
|
||||
const uint16_t RDButtonCenter[67] = {
|
||||
9030, 4320, 680, 470, 630, 470, 680, 420, 680, 470, 630, 470,
|
||||
680, 420, 680, 470, 630, 1570, 680, 1520, 680, 1520, 680, 1520,
|
||||
730, 1520, 680, 1520, 680, 1520, 680, 1570, 680, 420, 680, 1520,
|
||||
@@ -51,9 +52,13 @@ private:
|
||||
630, 470, 630, 1570, 680, 470, 630, 470, 630, 470, 680, 470,
|
||||
630, 1570, 630, 1570, 680, 1570, 630};
|
||||
|
||||
const uint16_t RDButtonA[67] = {8980,4370, 630,470, 680,470, 630,470, 630,470, 630,520, 630,470, 630,470, 630,1620, 630,1570, 630,1620, 580,1570, 630,1620, 630,1570, 630,1570, 630,1570, 680,470, 630,1570, 630,1570, 630,1620, 630,470, 630,470, 630,470, 680,470, 630,470, 630,470, 680,470, 630,470, 630,1570, 630,1620, 630,1570, 630,1570, 630,1570, 630};
|
||||
|
||||
const uint16_t RDButtonB[67] = {9030,4320, 630,520, 580,520, 630,470, 630,470, 680,470, 580,520, 630,470, 680,1570, 630,1570, 630,1570, 630,1570, 630,1620, 580,1620, 630,1570, 630,1620, 580,520, 580,520, 630,470, 680,470, 630,1570, 630,470, 630,520, 580,520, 630,470, 630,1620, 630,1570, 630,1570, 630,470, 680,1570, 630,1570, 630,1570, 630,1570, 680};
|
||||
|
||||
public:
|
||||
IRLight(int pin);
|
||||
IRLight(IRsend *irsend);
|
||||
explicit IRLight(int pin);
|
||||
explicit IRLight(IRsend *irsend);
|
||||
|
||||
void setState(bool state);
|
||||
bool getState();
|
||||
@@ -63,6 +68,9 @@ public:
|
||||
void setBrightness(int brightness);
|
||||
int getBrightness();
|
||||
|
||||
void setColorTemperature(int color);
|
||||
int getColorTemperature();
|
||||
|
||||
void brightnessUp();
|
||||
void brightnessDown();
|
||||
int getBrightnessScale();
|
||||
|
Reference in New Issue
Block a user