renamed LED to RGB, since that's what it is

This commit is contained in:
2016-05-17 22:14:03 +02:00
parent e15a65c69d
commit 783286849a
3 changed files with 62 additions and 62 deletions

View File

@@ -1,36 +0,0 @@
#pragma once
#include "Device.h"
#include <Homie.h>
class DeviceLed : public Device {
public:
inline DeviceLed(byte ledRed, byte ledGreen, byte ledBlue) {
pinRed = ledRed;
pinGreen = ledGreen;
pinBlue = ledBlue;
}
virtual void deviceSetup();
virtual void deviceRegister();
virtual void deviceLoop();
private:
byte pinRed;
byte pinGreen;
byte pinBlue;
int led_red = 0;
int led_green = 0;
int led_blue = 0;
bool fading = false;
int fade_from_red, fade_to_red;
int fade_from_green, fade_to_green;
int fade_from_blue, fade_to_blue;
unsigned long fade_start = 0;
unsigned long fade_end = 0;
float progress_last = 0;
void setLed(int red, int green, int blue);
void publishStatus();
bool ledOnHandler(String value);
bool ledColorHandler(String message);
bool ledFadeHandler(String message);
HomieNode ledNode{"led", "rgb"};
};