Code clean-up.
This commit is contained in:
parent
e5417d12ca
commit
83452d73bc
@ -25,7 +25,9 @@
|
||||
*/
|
||||
|
||||
#include "FX.h"
|
||||
#ifndef WLED_DISABLE_FX_HIGH_FLASH_USE
|
||||
#include "tv_colors.h"
|
||||
#endif
|
||||
|
||||
#define IBN 5100
|
||||
#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3)
|
||||
|
@ -13,11 +13,13 @@
|
||||
//increase if you need more
|
||||
#define WLED_MAX_USERMODS 4
|
||||
|
||||
#ifndef WLED_MAX_BUSSES
|
||||
#ifdef ESP8266
|
||||
#define WLED_MAX_BUSSES 3
|
||||
#else
|
||||
#define WLED_MAX_BUSSES 10
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//Usermod IDs
|
||||
#define USERMOD_ID_RESERVED 0 //Unused. Might indicate no usermod present
|
||||
|
@ -781,13 +781,13 @@ void serveJson(AsyncWebServerRequest* request)
|
||||
|
||||
bool serveLiveLeds(AsyncWebServerRequest* request, uint32_t wsClient)
|
||||
{
|
||||
#ifdef WLED_ENABLE_WEBSOCKETS
|
||||
AsyncWebSocketClient * wsc = nullptr;
|
||||
if (!request) { //not HTTP, use Websockets
|
||||
#ifdef WLED_ENABLE_WEBSOCKETS
|
||||
wsc = ws.client(wsClient);
|
||||
if (!wsc || wsc->queueLength() > 0) return false; //only send if queue free
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
uint16_t used = ledCount;
|
||||
uint16_t n = (used -1) /MAX_LIVE_LEDS +1; //only serve every n'th LED if count over MAX_LIVE_LEDS
|
||||
|
@ -369,7 +369,7 @@ void _drawOverlayCronixie()
|
||||
}
|
||||
|
||||
#else // WLED_DISABLE_CRONIXIE
|
||||
byte getSameCodeLength(char code, int index, char const cronixieDisplay[]) {}
|
||||
byte getSameCodeLength(char code, int index, char const cronixieDisplay[]) {return 0;}
|
||||
void setCronixie() {}
|
||||
void _overlayCronixie() {}
|
||||
void _drawOverlayCronixie() {}
|
||||
|
@ -219,6 +219,7 @@ void WLED::loop()
|
||||
|
||||
//LED settings have been saved, re-init busses
|
||||
if (busConfigs[0] != nullptr) {
|
||||
DEBUG_PRINTLN(F("Re-init busses."));
|
||||
busses.removeAll();
|
||||
uint32_t mem = 0;
|
||||
for (uint8_t i = 0; i < WLED_MAX_BUSSES; i++) {
|
||||
@ -254,6 +255,7 @@ void WLED::loop()
|
||||
if (millis() - lastMqttReconnectAttempt > 30000) {
|
||||
// lastMqttReconnectAttempt = millis(); // don't do it in initMqtt()
|
||||
initMqtt();
|
||||
yield();
|
||||
// refresh WLED nodes list
|
||||
refreshNodeList();
|
||||
sendSysInfoUDP();
|
||||
|
@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
// version code in format yymmddb (b = daily build)
|
||||
#define VERSION 2103030
|
||||
#define VERSION 2103040
|
||||
|
||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||
//#define WLED_USE_MY_CONFIG
|
||||
|
Loading…
Reference in New Issue
Block a user