Dynamic Peek framerates 🎉

This commit is contained in:
Ewoud
2023-05-29 21:53:48 +02:00
parent b1e9f825ca
commit e9a2777ee5
2 changed files with 3 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
*/
// 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
//#define WLED_USE_MY_CONFIG

View File

@@ -9,7 +9,7 @@ uint16_t wsLiveClientId = 0;
unsigned long wsLastLiveTime = 0;
//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)
{
@@ -200,7 +200,7 @@ bool sendLiveLedsWs(uint32_t wsClient)
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
ws.cleanupClients(3);