Added recorder to be able to stream the current LED data via network. That way you can create nice looking GIF images of the effects - and even develop effects without having to look at the actual LED panel.
This commit is contained in:
@ -42,6 +42,9 @@
|
||||
#define FPS 50
|
||||
#define SHOW_TEXT_DELAY 100
|
||||
|
||||
#define RECORDER_ENABLE
|
||||
#define RECORDER_PORT 2122
|
||||
|
||||
#define MONITOR_LOOP_TIMES false
|
||||
#define MONITOR_LOOP_TIME_THRESHOLD 500
|
||||
#define MONITOR_LOOP_TIME_COUNT_MAX 10
|
||||
|
21
include/recorder.h
Normal file
21
include/recorder.h
Normal file
@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "my_wifi.h"
|
||||
#include "config.h"
|
||||
#include <ESPAsyncTCP.h>
|
||||
#include <WiFiUdp.h>
|
||||
|
||||
#ifdef RECORDER_ENABLE
|
||||
class Recorder {
|
||||
private:
|
||||
WiFiUDP _udp;
|
||||
AsyncServer* _server;
|
||||
AsyncClient* _client = NULL;
|
||||
uint16_t _client_port = 0;
|
||||
size_t _buffer_len;
|
||||
char* _buffer;
|
||||
uint16_t _msgid;
|
||||
public:
|
||||
Recorder();
|
||||
void loop();
|
||||
};
|
||||
#endif
|
Reference in New Issue
Block a user