Files
esp8266_deauther/esp8266_deauther/Neopixel.h
Stefan Kremser fab38e7c3f Updated inlcudes
The one thing my Java prof is right about when he hates against C, is that its includes are super annoying...
2018-04-01 16:42:30 +02:00

52 lines
1.1 KiB
C++

#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