Added RGB LED, and new counters

This commit is contained in:
Charles 2018-04-02 01:36:51 +02:00
parent 2a7989658d
commit 5aa86ba801

View File

@ -3,6 +3,8 @@
// std::set for unified array functions
#include <set>
#include <array>
#include <algorithm>
// OLED Display
#include <U8x8lib.h>
@ -11,6 +13,12 @@
#include <lmic.h>
#include <hal/hal.h>
#ifdef HAS_RGB_LED
#include <SmartLeds.h>
#endif
#include "rgb_led.h"
#include "macsniff.h"
// Struct holding devices's runtime configuration
typedef struct {
int8_t lorasf; // 7-12, lora spreadfactor
@ -25,6 +33,7 @@ typedef struct {
int8_t blescancycle; // BLE scan cycle [seconds]
int8_t blescan; // 0=disabled, 1=enabled
int8_t wifiant; // 0=internal, 1=external (for LoPy/LoPy4)
int8_t rgblum; // RGB Led luminosity (0 100%)
char version[10]; // Firmware version
} configData_t;
@ -32,8 +41,9 @@ extern configData_t cfg;
extern uint8_t mydata[];
extern uint64_t uptimecounter;
extern osjob_t sendjob;
extern int macnum, blenum, countermode, screensaver, adrmode, lorasf, txpower, rlim, salt;
extern int countermode, screensaver, adrmode, lorasf, txpower, rlim, salt;
extern bool joinstate;
extern std::set<uint32_t> wifis;
extern std::set<uint32_t> macs;
#ifdef HAS_DISPLAY
@ -44,4 +54,5 @@ extern std::set<uint32_t> macs;
#ifdef BLECOUNTER
extern int scanTime;
#endif
extern std::set<uint32_t> bles;
#endif