mirror of
https://github.com/wled/WLED.git
synced 2025-07-19 08:46:34 +00:00
Code clean-up.
This commit is contained in:
parent
e5417d12ca
commit
83452d73bc
@ -25,7 +25,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "FX.h"
|
#include "FX.h"
|
||||||
|
#ifndef WLED_DISABLE_FX_HIGH_FLASH_USE
|
||||||
#include "tv_colors.h"
|
#include "tv_colors.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define IBN 5100
|
#define IBN 5100
|
||||||
#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3)
|
#define PALETTE_SOLID_WRAP (paletteBlend == 1 || paletteBlend == 3)
|
||||||
|
@ -13,11 +13,13 @@
|
|||||||
//increase if you need more
|
//increase if you need more
|
||||||
#define WLED_MAX_USERMODS 4
|
#define WLED_MAX_USERMODS 4
|
||||||
|
|
||||||
|
#ifndef WLED_MAX_BUSSES
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#define WLED_MAX_BUSSES 3
|
#define WLED_MAX_BUSSES 3
|
||||||
#else
|
#else
|
||||||
#define WLED_MAX_BUSSES 10
|
#define WLED_MAX_BUSSES 10
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
//Usermod IDs
|
//Usermod IDs
|
||||||
#define USERMOD_ID_RESERVED 0 //Unused. Might indicate no usermod present
|
#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)
|
bool serveLiveLeds(AsyncWebServerRequest* request, uint32_t wsClient)
|
||||||
{
|
{
|
||||||
|
#ifdef WLED_ENABLE_WEBSOCKETS
|
||||||
AsyncWebSocketClient * wsc = nullptr;
|
AsyncWebSocketClient * wsc = nullptr;
|
||||||
if (!request) { //not HTTP, use Websockets
|
if (!request) { //not HTTP, use Websockets
|
||||||
#ifdef WLED_ENABLE_WEBSOCKETS
|
|
||||||
wsc = ws.client(wsClient);
|
wsc = ws.client(wsClient);
|
||||||
if (!wsc || wsc->queueLength() > 0) return false; //only send if queue free
|
if (!wsc || wsc->queueLength() > 0) return false; //only send if queue free
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
uint16_t used = ledCount;
|
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
|
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
|
#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 setCronixie() {}
|
||||||
void _overlayCronixie() {}
|
void _overlayCronixie() {}
|
||||||
void _drawOverlayCronixie() {}
|
void _drawOverlayCronixie() {}
|
||||||
|
@ -219,6 +219,7 @@ void WLED::loop()
|
|||||||
|
|
||||||
//LED settings have been saved, re-init busses
|
//LED settings have been saved, re-init busses
|
||||||
if (busConfigs[0] != nullptr) {
|
if (busConfigs[0] != nullptr) {
|
||||||
|
DEBUG_PRINTLN(F("Re-init busses."));
|
||||||
busses.removeAll();
|
busses.removeAll();
|
||||||
uint32_t mem = 0;
|
uint32_t mem = 0;
|
||||||
for (uint8_t i = 0; i < WLED_MAX_BUSSES; i++) {
|
for (uint8_t i = 0; i < WLED_MAX_BUSSES; i++) {
|
||||||
@ -254,6 +255,7 @@ void WLED::loop()
|
|||||||
if (millis() - lastMqttReconnectAttempt > 30000) {
|
if (millis() - lastMqttReconnectAttempt > 30000) {
|
||||||
// lastMqttReconnectAttempt = millis(); // don't do it in initMqtt()
|
// lastMqttReconnectAttempt = millis(); // don't do it in initMqtt()
|
||||||
initMqtt();
|
initMqtt();
|
||||||
|
yield();
|
||||||
// refresh WLED nodes list
|
// refresh WLED nodes list
|
||||||
refreshNodeList();
|
refreshNodeList();
|
||||||
sendSysInfoUDP();
|
sendSysInfoUDP();
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// 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
|
//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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user