mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-20 13:39:58 +01:00
Forgot to delete LED classes
This commit is contained in:
@@ -1,44 +0,0 @@
|
|||||||
#include "AnalogRGBLED.h"
|
|
||||||
|
|
||||||
AnalogRGBLED::AnalogRGBLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, uint8_t brightness, bool anode) {
|
|
||||||
AnalogRGBLED::anode = anode;
|
|
||||||
AnalogRGBLED::rPin = rPin;
|
|
||||||
AnalogRGBLED::gPin = gPin;
|
|
||||||
AnalogRGBLED::bPin = bPin;
|
|
||||||
setBrightness(brightness);
|
|
||||||
}
|
|
||||||
|
|
||||||
AnalogRGBLED::~AnalogRGBLED() {}
|
|
||||||
|
|
||||||
void AnalogRGBLED::setup() {
|
|
||||||
analogWriteRange(0xff);
|
|
||||||
|
|
||||||
if (rPin < 255) pinMode(rPin, OUTPUT);
|
|
||||||
|
|
||||||
if (gPin < 255) pinMode(gPin, OUTPUT);
|
|
||||||
|
|
||||||
if (bPin < 255) pinMode(bPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnalogRGBLED::setColor(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
if ((r > 0) && (brightness < 100)) r = r * brightness / 100;
|
|
||||||
|
|
||||||
if ((g > 0) && (brightness < 100)) g = g * brightness / 100;
|
|
||||||
|
|
||||||
if ((b > 0) && (brightness < 100)) b = b * brightness / 100;
|
|
||||||
|
|
||||||
if (anode) {
|
|
||||||
r = 255 - r;
|
|
||||||
g = 255 - g;
|
|
||||||
b = 255 - b;
|
|
||||||
}
|
|
||||||
|
|
||||||
analogWrite(rPin, r);
|
|
||||||
analogWrite(gPin, g);
|
|
||||||
analogWrite(bPin, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AnalogRGBLED::setBrightness(uint8_t brightness) {
|
|
||||||
if (brightness > 100) brightness = 100;
|
|
||||||
AnalogRGBLED::brightness = brightness;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#ifndef AnalogRGBLED_H
|
|
||||||
#define AnalogRGBLED_H
|
|
||||||
|
|
||||||
#include "StatusLED.h"
|
|
||||||
|
|
||||||
class AnalogRGBLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
AnalogRGBLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, uint8_t brightness, bool anode);
|
|
||||||
~AnalogRGBLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool anode = true;
|
|
||||||
uint8_t rPin = 255;
|
|
||||||
uint8_t gPin = 255;
|
|
||||||
uint8_t bPin = 255;
|
|
||||||
uint8_t brightness = 0;
|
|
||||||
};
|
|
||||||
#endif // ifndef AnalogRGBLED_H
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#include "DigitalLED.h"
|
|
||||||
|
|
||||||
DigitalLED::DigitalLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, bool anode) {
|
|
||||||
DigitalLED::anode = anode;
|
|
||||||
DigitalLED::rPin = rPin;
|
|
||||||
DigitalLED::gPin = gPin;
|
|
||||||
DigitalLED::bPin = bPin;
|
|
||||||
}
|
|
||||||
|
|
||||||
DigitalLED::~DigitalLED() {}
|
|
||||||
|
|
||||||
void DigitalLED::setup() {
|
|
||||||
if (rPin < 255) pinMode(rPin, OUTPUT);
|
|
||||||
|
|
||||||
if (gPin < 255) pinMode(gPin, OUTPUT);
|
|
||||||
|
|
||||||
if (bPin < 255) pinMode(bPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DigitalLED::setColor(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
if (anode) {
|
|
||||||
if (rPin < 255) digitalWrite(rPin, r > 0);
|
|
||||||
|
|
||||||
if (gPin < 255) digitalWrite(gPin, g > 0);
|
|
||||||
|
|
||||||
if (bPin < 255) digitalWrite(bPin, b > 0);
|
|
||||||
} else {
|
|
||||||
if (rPin < 255) digitalWrite(rPin, r == 0);
|
|
||||||
|
|
||||||
if (gPin < 255) digitalWrite(gPin, g == 0);
|
|
||||||
|
|
||||||
if (bPin < 255) digitalWrite(bPin, b == 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DigitalLED::setBrightness(uint8_t brightness) {}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#ifndef DigitalLED_H
|
|
||||||
#define DigitalLED_H
|
|
||||||
|
|
||||||
#include "StatusLED.h"
|
|
||||||
|
|
||||||
class DigitalLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
DigitalLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, bool anode);
|
|
||||||
~DigitalLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool anode = true;
|
|
||||||
uint8_t rPin = 255;
|
|
||||||
uint8_t gPin = 255;
|
|
||||||
uint8_t bPin = 255;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ifndef DigitalLED_H
|
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
#include "LEDController.h"
|
|
||||||
|
|
||||||
LEDController::LEDController() {}
|
|
||||||
|
|
||||||
LEDController::~LEDController() {
|
|
||||||
if (led) delete led;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::setup() {
|
|
||||||
#ifdef DIGITAL_LED
|
|
||||||
led = new DigitalLED(LED_PIN_R, LED_PIN_G, LED_PIN_B, LED_ANODE);
|
|
||||||
led->setup();
|
|
||||||
return;
|
|
||||||
|
|
||||||
#endif // ifdef DIGITAL_LED
|
|
||||||
|
|
||||||
#ifdef RGB_LED
|
|
||||||
led = new LEDController::AnalogRGBLED(LED_PIN_R, LED_PIN_G, LED_PIN_B, LED_MODE_BRIGHTNESS, LED_ANODE);
|
|
||||||
led->setup();
|
|
||||||
return;
|
|
||||||
|
|
||||||
#endif // ifdef RGB_LED
|
|
||||||
|
|
||||||
#ifdef NEOPIXEL_LED
|
|
||||||
led = new LEDController::NeopixelLED(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, LED_MODE_BRIGHTNESS);
|
|
||||||
led->setup();
|
|
||||||
return;
|
|
||||||
|
|
||||||
#endif // ifdef NEOPIXEL_LED
|
|
||||||
|
|
||||||
prntln(L_NOT_CONFIGURED);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::update() {
|
|
||||||
if (!tempEnabled || !led) return;
|
|
||||||
|
|
||||||
if (!settings.getLedEnabled() && tempEnabled) tempDisable();
|
|
||||||
|
|
||||||
if (scan.isScanning() && (scan.deauths < settings.getMinDeauths())) setMode(LED_MODE::SCAN, false);
|
|
||||||
else if (scan.deauths >= settings.getMinDeauths()) setMode(LED_MODE::DEAUTH, false);
|
|
||||||
else if (attack.isRunning()) setMode(LED_MODE::ATTACK, false);
|
|
||||||
else setMode(LED_MODE::IDLE, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::setMode(uint8_t mode, bool force) {
|
|
||||||
if (!led) return;
|
|
||||||
|
|
||||||
if ((mode != LEDController::mode) || force) {
|
|
||||||
LEDController::mode = mode;
|
|
||||||
|
|
||||||
switch (mode) {
|
|
||||||
case LED_MODE::OFF:
|
|
||||||
led->setColor(0, 0, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LED_MODE::SCAN:
|
|
||||||
led->setColor(0, 0, 255);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LED_MODE::ATTACK:
|
|
||||||
led->setColor(255, 255, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LED_MODE::DEAUTH:
|
|
||||||
led->setColor(255, 0, 0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case LED_MODE::IDLE:
|
|
||||||
led->setColor(0, 255, 0);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::setColor(uint8_t r, uint8_t g, uint8_t b, bool output) {
|
|
||||||
// debug output
|
|
||||||
if (output) {
|
|
||||||
char s[30];
|
|
||||||
sprintf_P(s, L_OUTPUT, r, g, b);
|
|
||||||
prnt(String(s));
|
|
||||||
}
|
|
||||||
|
|
||||||
led->setColor(r, g, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness, bool output) {
|
|
||||||
led->setBrightness(brightness);
|
|
||||||
setColor(r, g, b, output);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::tempEnable() {
|
|
||||||
tempEnabled = true;
|
|
||||||
prntln(L_ENABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::tempDisable() {
|
|
||||||
tempEnabled = false;
|
|
||||||
prntln(L_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool LEDController::getTempEnabled() {
|
|
||||||
return tempEnabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== DigitalLED ===== //
|
|
||||||
LEDController::DigitalLED::DigitalLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, bool anode) {
|
|
||||||
LEDController::DigitalLED::anode = anode;
|
|
||||||
LEDController::DigitalLED::rPin = rPin;
|
|
||||||
LEDController::DigitalLED::gPin = gPin;
|
|
||||||
LEDController::DigitalLED::bPin = bPin;
|
|
||||||
}
|
|
||||||
|
|
||||||
LEDController::DigitalLED::~DigitalLED() {}
|
|
||||||
|
|
||||||
void LEDController::DigitalLED::setup() {
|
|
||||||
if (rPin < 255) pinMode(rPin, OUTPUT);
|
|
||||||
|
|
||||||
if (gPin < 255) pinMode(gPin, OUTPUT);
|
|
||||||
|
|
||||||
if (bPin < 255) pinMode(bPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::DigitalLED::setColor(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
if (anode) {
|
|
||||||
if (rPin < 255) digitalWrite(rPin, r > 0);
|
|
||||||
|
|
||||||
if (gPin < 255) digitalWrite(gPin, g > 0);
|
|
||||||
|
|
||||||
if (bPin < 255) digitalWrite(bPin, b > 0);
|
|
||||||
} else {
|
|
||||||
if (rPin < 255) digitalWrite(rPin, r == 0);
|
|
||||||
|
|
||||||
if (gPin < 255) digitalWrite(gPin, g == 0);
|
|
||||||
|
|
||||||
if (bPin < 255) digitalWrite(bPin, b == 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::DigitalLED::setBrightness(uint8_t brightness) {}
|
|
||||||
|
|
||||||
|
|
||||||
// ===== AnalogRGBLED ===== //
|
|
||||||
LEDController::AnalogRGBLED::AnalogRGBLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, uint8_t brightness, bool anode) {
|
|
||||||
LEDController::AnalogRGBLED::anode = anode;
|
|
||||||
LEDController::AnalogRGBLED::rPin = rPin;
|
|
||||||
LEDController::AnalogRGBLED::gPin = gPin;
|
|
||||||
LEDController::AnalogRGBLED::bPin = bPin;
|
|
||||||
setBrightness(brightness);
|
|
||||||
}
|
|
||||||
|
|
||||||
LEDController::AnalogRGBLED::~AnalogRGBLED() {}
|
|
||||||
|
|
||||||
void LEDController::AnalogRGBLED::setup() {
|
|
||||||
analogWriteRange(0xff);
|
|
||||||
|
|
||||||
if (rPin < 255) pinMode(rPin, OUTPUT);
|
|
||||||
|
|
||||||
if (gPin < 255) pinMode(gPin, OUTPUT);
|
|
||||||
|
|
||||||
if (bPin < 255) pinMode(bPin, OUTPUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::AnalogRGBLED::setColor(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
if ((r > 0) && (brightness < 100)) r = r * brightness / 100;
|
|
||||||
|
|
||||||
if ((g > 0) && (brightness < 100)) g = g * brightness / 100;
|
|
||||||
|
|
||||||
if ((b > 0) && (brightness < 100)) b = b * brightness / 100;
|
|
||||||
|
|
||||||
if (anode) {
|
|
||||||
r = 255 - r;
|
|
||||||
g = 255 - g;
|
|
||||||
b = 255 - b;
|
|
||||||
}
|
|
||||||
|
|
||||||
analogWrite(rPin, r);
|
|
||||||
analogWrite(gPin, g);
|
|
||||||
analogWrite(bPin, b);
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::AnalogRGBLED::setBrightness(uint8_t brightness) {
|
|
||||||
if (brightness > 100) brightness = 100;
|
|
||||||
LEDController::AnalogRGBLED::brightness = brightness;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== NeopixelLED ===== //
|
|
||||||
LEDController::NeopixelLED::NeopixelLED(int num, uint8_t dataPin, uint8_t brightness) {
|
|
||||||
strip = new Adafruit_NeoPixel(num, dataPin, LED_NEOPIXEL_MODE);
|
|
||||||
setBrightness(brightness);
|
|
||||||
}
|
|
||||||
|
|
||||||
LEDController::NeopixelLED::~NeopixelLED() {
|
|
||||||
delete strip;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::NeopixelLED::setup() {
|
|
||||||
strip->begin();
|
|
||||||
strip->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::NeopixelLED::setColor(uint8_t r, uint8_t g, uint8_t b) {
|
|
||||||
int num = strip->numPixels();
|
|
||||||
|
|
||||||
for (uint16_t i = 0; i < num; i++) strip->setPixelColor(i, strip->Color(r, g, b));
|
|
||||||
strip->show();
|
|
||||||
}
|
|
||||||
|
|
||||||
void LEDController::NeopixelLED::setBrightness(uint8_t brightness) {
|
|
||||||
if (brightness > 100) brightness = 100;
|
|
||||||
strip->setBrightness(brightness);
|
|
||||||
}
|
|
||||||
@@ -1,105 +0,0 @@
|
|||||||
#ifndef LEDController_h
|
|
||||||
#define LEDController_h
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
extern "C" {
|
|
||||||
#include "user_interface.h"
|
|
||||||
}
|
|
||||||
#include "language.h"
|
|
||||||
#include "A_config.h"
|
|
||||||
#include "Settings.h"
|
|
||||||
#include "Attack.h"
|
|
||||||
#include "Scan.h"
|
|
||||||
|
|
||||||
#include <Adafruit_NeoPixel.h>
|
|
||||||
|
|
||||||
extern Settings settings;
|
|
||||||
extern Attack attack;
|
|
||||||
extern Scan scan;
|
|
||||||
extern Stations stations;
|
|
||||||
|
|
||||||
class LEDController {
|
|
||||||
public:
|
|
||||||
enum LED_MODE { OFF = 0, SCAN = 1, ATTACK = 2, DEAUTH = 3, IDLE = 4 };
|
|
||||||
|
|
||||||
LEDController();
|
|
||||||
~LEDController();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void update();
|
|
||||||
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b, bool output);
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness, bool output);
|
|
||||||
|
|
||||||
void tempEnable();
|
|
||||||
void tempDisable();
|
|
||||||
bool getTempEnabled();
|
|
||||||
|
|
||||||
private:
|
|
||||||
class StatusLED {
|
|
||||||
public:
|
|
||||||
virtual ~StatusLED() = default;
|
|
||||||
|
|
||||||
virtual void setup() = 0;
|
|
||||||
|
|
||||||
virtual void setColor(uint8_t r, uint8_t g, uint8_t b) = 0;
|
|
||||||
virtual void setBrightness(uint8_t brightness) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class DigitalLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
DigitalLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, bool anode);
|
|
||||||
~DigitalLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool anode = true;
|
|
||||||
uint8_t rPin = 255;
|
|
||||||
uint8_t gPin = 255;
|
|
||||||
uint8_t bPin = 255;
|
|
||||||
};
|
|
||||||
|
|
||||||
class AnalogRGBLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
AnalogRGBLED(uint8_t rPin, uint8_t gPin, uint8_t bPin, uint8_t brightness, bool anode);
|
|
||||||
~AnalogRGBLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool anode = true;
|
|
||||||
uint8_t rPin = 255;
|
|
||||||
uint8_t gPin = 255;
|
|
||||||
uint8_t bPin = 255;
|
|
||||||
uint8_t brightness = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class NeopixelLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
NeopixelLED(int num, uint8_t dataPin, uint8_t brightness);
|
|
||||||
~NeopixelLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Adafruit_NeoPixel* strip;
|
|
||||||
};
|
|
||||||
|
|
||||||
bool tempEnabled = true;
|
|
||||||
uint8_t mode = LED_MODE::OFF;
|
|
||||||
StatusLED* led = NULL;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ifndef LEDController_h
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#ifndef Neopixel_h
|
|
||||||
#define Neopixel_h
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
#include <ESP8266WiFi.h>
|
|
||||||
extern "C" {
|
|
||||||
#include "user_interface.h"
|
|
||||||
}
|
|
||||||
#include <Adafruit_NeoPixel.h>
|
|
||||||
#include "language.h"
|
|
||||||
#include "A_config.h"
|
|
||||||
#include "Settings.h"
|
|
||||||
#include "Attack.h"
|
|
||||||
#include "Scan.h"
|
|
||||||
|
|
||||||
#define LED_MODE_OFF 0
|
|
||||||
#define LED_MODE_SCAN 1
|
|
||||||
#define LED_MODE_ATTACK 2
|
|
||||||
#define LED_MODE_DEAUTH 3
|
|
||||||
#define LED_MODE_IDLE 4
|
|
||||||
|
|
||||||
extern Settings settings;
|
|
||||||
extern Attack attack;
|
|
||||||
extern Scan scan;
|
|
||||||
extern Stations stations;
|
|
||||||
|
|
||||||
class Neopixel {
|
|
||||||
public:
|
|
||||||
Neopixel();
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
void update();
|
|
||||||
void tempEnable();
|
|
||||||
void tempDisable();
|
|
||||||
bool getTempEnabled();
|
|
||||||
private:
|
|
||||||
// ===== adjustable ===== //
|
|
||||||
Adafruit_NeoPixel strip = LED_NEOPIXEL;
|
|
||||||
// ======================= //
|
|
||||||
|
|
||||||
uint8_t mode;
|
|
||||||
bool tempEnabled = true;
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b, uint8_t brightness, bool output);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
#ifndef NeopixelLED_H
|
|
||||||
#define NeopixelLED_H
|
|
||||||
|
|
||||||
#include "StatusLED.h"
|
|
||||||
#include <Adafruit_NeoPixel.h>
|
|
||||||
|
|
||||||
class NeopixelLED : public StatusLED {
|
|
||||||
public:
|
|
||||||
NeopixelLED(int num, uint8_t dataPin, uint8_t brightness);
|
|
||||||
~NeopixelLED();
|
|
||||||
|
|
||||||
void setup();
|
|
||||||
void setColor(uint8_t r, uint8_t g, uint8_t b);
|
|
||||||
void setBrightness(uint8_t brightness);
|
|
||||||
void setMode(uint8_t mode, bool force);
|
|
||||||
|
|
||||||
private:
|
|
||||||
Adafruit_NeoPixel* strip;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ifndef NeopixelLED_H
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
#ifndef StatusLED_H
|
|
||||||
#define StatusLED_H
|
|
||||||
|
|
||||||
#include "Arduino.h"
|
|
||||||
|
|
||||||
class StatusLED {
|
|
||||||
public:
|
|
||||||
virtual ~StatusLED() = default;
|
|
||||||
|
|
||||||
virtual void setup() = 0;
|
|
||||||
|
|
||||||
virtual void setColor(uint8_t r, uint8_t g, uint8_t b) = 0;
|
|
||||||
virtual void setBrightness(uint8_t brightness) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // ifndef StatusLED_H
|
|
||||||
Reference in New Issue
Block a user