Added RGB LED, and new counters
This commit is contained in:
parent
2a7989658d
commit
5aa86ba801
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
// std::set for unified array functions
|
// std::set for unified array functions
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <array>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
// OLED Display
|
// OLED Display
|
||||||
#include <U8x8lib.h>
|
#include <U8x8lib.h>
|
||||||
@ -11,6 +13,12 @@
|
|||||||
#include <lmic.h>
|
#include <lmic.h>
|
||||||
#include <hal/hal.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
|
// Struct holding devices's runtime configuration
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int8_t lorasf; // 7-12, lora spreadfactor
|
int8_t lorasf; // 7-12, lora spreadfactor
|
||||||
@ -25,6 +33,7 @@ typedef struct {
|
|||||||
int8_t blescancycle; // BLE scan cycle [seconds]
|
int8_t blescancycle; // BLE scan cycle [seconds]
|
||||||
int8_t blescan; // 0=disabled, 1=enabled
|
int8_t blescan; // 0=disabled, 1=enabled
|
||||||
int8_t wifiant; // 0=internal, 1=external (for LoPy/LoPy4)
|
int8_t wifiant; // 0=internal, 1=external (for LoPy/LoPy4)
|
||||||
|
int8_t rgblum; // RGB Led luminosity (0 100%)
|
||||||
char version[10]; // Firmware version
|
char version[10]; // Firmware version
|
||||||
} configData_t;
|
} configData_t;
|
||||||
|
|
||||||
@ -32,8 +41,9 @@ extern configData_t cfg;
|
|||||||
extern uint8_t mydata[];
|
extern uint8_t mydata[];
|
||||||
extern uint64_t uptimecounter;
|
extern uint64_t uptimecounter;
|
||||||
extern osjob_t sendjob;
|
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 bool joinstate;
|
||||||
|
extern std::set<uint32_t> wifis;
|
||||||
extern std::set<uint32_t> macs;
|
extern std::set<uint32_t> macs;
|
||||||
|
|
||||||
#ifdef HAS_DISPLAY
|
#ifdef HAS_DISPLAY
|
||||||
@ -44,4 +54,5 @@ extern std::set<uint32_t> macs;
|
|||||||
|
|
||||||
#ifdef BLECOUNTER
|
#ifdef BLECOUNTER
|
||||||
extern int scanTime;
|
extern int scanTime;
|
||||||
#endif
|
extern std::set<uint32_t> bles;
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user