Dynamic Peek framerates 🎉
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2305290
|
#define VERSION 2305291
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ uint16_t wsLiveClientId = 0;
|
|||||||
unsigned long wsLastLiveTime = 0;
|
unsigned long wsLastLiveTime = 0;
|
||||||
//uint8_t* wsFrameBuffer = nullptr;
|
//uint8_t* wsFrameBuffer = nullptr;
|
||||||
|
|
||||||
#define WS_LIVE_INTERVAL 40
|
#define WS_LIVE_INTERVAL 160
|
||||||
|
|
||||||
void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len)
|
void wsEvent(AsyncWebSocket * server, AsyncWebSocketClient * client, AwsEventType type, void * arg, uint8_t *data, size_t len)
|
||||||
{
|
{
|
||||||
@@ -200,7 +200,7 @@ bool sendLiveLedsWs(uint32_t wsClient)
|
|||||||
|
|
||||||
void handleWs()
|
void handleWs()
|
||||||
{
|
{
|
||||||
if (millis() - wsLastLiveTime > WS_LIVE_INTERVAL)
|
if (millis() - wsLastLiveTime > MAX((strip.getLengthTotal()/20), WS_LIVE_INTERVAL)) //WLEDMM dynamic nr of peek frames per second
|
||||||
{
|
{
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
ws.cleanupClients(3);
|
ws.cleanupClients(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user