Indents for the #ifdef's in wled00.ino (#716)
This commit is contained in:
parent
2d75526395
commit
730ba12c8d
@ -36,8 +36,8 @@
|
|||||||
//library inclusions
|
//library inclusions
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
#include <ESPDMX.h>
|
#include <ESPDMX.h>
|
||||||
DMXESPSerial dmx;
|
DMXESPSerial dmx;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
@ -46,12 +46,12 @@ DMXESPSerial dmx;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <user_interface.h>
|
#include <user_interface.h>
|
||||||
}
|
}
|
||||||
#else
|
#else //ESP32
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
#include <ESPmDNS.h>
|
#include <ESPmDNS.h>
|
||||||
#include <AsyncTCP.h>
|
#include <AsyncTCP.h>
|
||||||
#include "SPIFFS.h"
|
#include "SPIFFS.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ESPAsyncWebServer.h>
|
#include <ESPAsyncWebServer.h>
|
||||||
@ -59,20 +59,20 @@ DMXESPSerial dmx;
|
|||||||
#include <WiFiUdp.h>
|
#include <WiFiUdp.h>
|
||||||
#include <DNSServer.h>
|
#include <DNSServer.h>
|
||||||
#ifndef WLED_DISABLE_OTA
|
#ifndef WLED_DISABLE_OTA
|
||||||
#include <ArduinoOTA.h>
|
#include <ArduinoOTA.h>
|
||||||
#endif
|
#endif
|
||||||
#include <SPIFFSEditor.h>
|
#include <SPIFFSEditor.h>
|
||||||
#include "src/dependencies/time/TimeLib.h"
|
#include "src/dependencies/time/TimeLib.h"
|
||||||
#include "src/dependencies/timezone/Timezone.h"
|
#include "src/dependencies/timezone/Timezone.h"
|
||||||
#ifndef WLED_DISABLE_ALEXA
|
#ifndef WLED_DISABLE_ALEXA
|
||||||
#define ESPALEXA_ASYNC
|
#define ESPALEXA_ASYNC
|
||||||
#define ESPALEXA_NO_SUBPAGE
|
#define ESPALEXA_NO_SUBPAGE
|
||||||
#define ESPALEXA_MAXDEVICES 1
|
#define ESPALEXA_MAXDEVICES 1
|
||||||
//#define ESPALEXA_DEBUG
|
// #define ESPALEXA_DEBUG
|
||||||
#include "src/dependencies/espalexa/Espalexa.h"
|
#include "src/dependencies/espalexa/Espalexa.h"
|
||||||
#endif
|
#endif
|
||||||
#ifndef WLED_DISABLE_BLYNK
|
#ifndef WLED_DISABLE_BLYNK
|
||||||
#include "src/dependencies/blynk/BlynkSimpleEsp.h"
|
#include "src/dependencies/blynk/BlynkSimpleEsp.h"
|
||||||
#endif
|
#endif
|
||||||
#include "src/dependencies/e131/ESPAsyncE131.h"
|
#include "src/dependencies/e131/ESPAsyncE131.h"
|
||||||
#include "src/dependencies/async-mqtt-client/AsyncMqttClient.h"
|
#include "src/dependencies/async-mqtt-client/AsyncMqttClient.h"
|
||||||
@ -95,15 +95,15 @@ DMXESPSerial dmx;
|
|||||||
|
|
||||||
|
|
||||||
#if IR_PIN < 0
|
#if IR_PIN < 0
|
||||||
#ifndef WLED_DISABLE_INFRARED
|
#ifndef WLED_DISABLE_INFRARED
|
||||||
#define WLED_DISABLE_INFRARED
|
#define WLED_DISABLE_INFRARED
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WLED_DISABLE_INFRARED
|
#ifndef WLED_DISABLE_INFRARED
|
||||||
#include <IRremoteESP8266.h>
|
#include <IRremoteESP8266.h>
|
||||||
#include <IRrecv.h>
|
#include <IRrecv.h>
|
||||||
#include <IRutils.h>
|
#include <IRutils.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// remove flicker because PWM signal of RGB channels can become out of phase
|
// remove flicker because PWM signal of RGB channels can become out of phase
|
||||||
@ -270,12 +270,12 @@ bool aOtaEnabled = true; //ArduinoOTA allows easy updates d
|
|||||||
uint16_t userVar0 = 0, userVar1 = 0;
|
uint16_t userVar0 = 0, userVar1 = 0;
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
//dmx CONFIG
|
//dmx CONFIG
|
||||||
byte DMXChannels = 7; // number of channels per fixture
|
byte DMXChannels = 7; // number of channels per fixture
|
||||||
byte DMXFixtureMap[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
byte DMXFixtureMap[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||||
// assigns the different channels to different functions. See wled21_dmx.ino for more information.
|
// assigns the different channels to different functions. See wled21_dmx.ino for more information.
|
||||||
uint16_t DMXGap = 10; // gap between the fixtures. makes addressing easier because you don't have to memorize odd numbers when climbing up onto a rig.
|
uint16_t DMXGap = 10; // gap between the fixtures. makes addressing easier because you don't have to memorize odd numbers when climbing up onto a rig.
|
||||||
uint16_t DMXStart = 10; // start address of the first fixture
|
uint16_t DMXStart = 10; // start address of the first fixture
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -398,7 +398,6 @@ byte realtimeMode = REALTIME_MODE_INACTIVE;
|
|||||||
IPAddress realtimeIP = (0,0,0,0);
|
IPAddress realtimeIP = (0,0,0,0);
|
||||||
unsigned long realtimeTimeout = 0;
|
unsigned long realtimeTimeout = 0;
|
||||||
|
|
||||||
|
|
||||||
//mqtt
|
//mqtt
|
||||||
long lastMqttReconnectAttempt = 0;
|
long lastMqttReconnectAttempt = 0;
|
||||||
long lastInterfaceUpdate = 0;
|
long lastInterfaceUpdate = 0;
|
||||||
@ -406,17 +405,17 @@ byte interfaceUpdateCallMode = NOTIFIER_CALL_MODE_INIT;
|
|||||||
char mqttStatusTopic[40] = ""; //this must be global because of async handlers
|
char mqttStatusTopic[40] = ""; //this must be global because of async handlers
|
||||||
|
|
||||||
#if AUXPIN >= 0
|
#if AUXPIN >= 0
|
||||||
//auxiliary debug pin
|
//auxiliary debug pin
|
||||||
byte auxTime = 0;
|
byte auxTime = 0;
|
||||||
unsigned long auxStartTime = 0;
|
unsigned long auxStartTime = 0;
|
||||||
bool auxActive = false, auxActiveBefore = false;
|
bool auxActive = false, auxActiveBefore = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//alexa udp
|
//alexa udp
|
||||||
String escapedMac;
|
String escapedMac;
|
||||||
#ifndef WLED_DISABLE_ALEXA
|
#ifndef WLED_DISABLE_ALEXA
|
||||||
Espalexa espalexa;
|
Espalexa espalexa;
|
||||||
EspalexaDevice* espalexaDevice;
|
EspalexaDevice* espalexaDevice;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//dns server
|
//dns server
|
||||||
@ -431,6 +430,7 @@ IPAddress ntpServerIP;
|
|||||||
uint16_t ntpLocalPort = 2390;
|
uint16_t ntpLocalPort = 2390;
|
||||||
#define NTP_PACKET_SIZE 48
|
#define NTP_PACKET_SIZE 48
|
||||||
|
|
||||||
|
//maximum number of LEDs - MAX_LEDS is comming from the JSON response getting too big, MAX_LEDS_DMA will become a timing issue
|
||||||
#define MAX_LEDS 1500
|
#define MAX_LEDS 1500
|
||||||
#define MAX_LEDS_DMA 500
|
#define MAX_LEDS_DMA 500
|
||||||
|
|
||||||
@ -439,6 +439,7 @@ uint16_t ntpLocalPort = 2390;
|
|||||||
char* obuf;
|
char* obuf;
|
||||||
uint16_t olen = 0;
|
uint16_t olen = 0;
|
||||||
|
|
||||||
|
//presets
|
||||||
uint16_t savedPresets = 0;
|
uint16_t savedPresets = 0;
|
||||||
int8_t currentPreset = -1;
|
int8_t currentPreset = -1;
|
||||||
bool isPreset = false;
|
bool isPreset = false;
|
||||||
@ -479,26 +480,26 @@ WS2812FX strip = WS2812FX();
|
|||||||
|
|
||||||
//debug macros
|
//debug macros
|
||||||
#ifdef WLED_DEBUG
|
#ifdef WLED_DEBUG
|
||||||
#define DEBUG_PRINT(x) Serial.print (x)
|
#define DEBUG_PRINT(x) Serial.print (x)
|
||||||
#define DEBUG_PRINTLN(x) Serial.println (x)
|
#define DEBUG_PRINTLN(x) Serial.println (x)
|
||||||
#define DEBUG_PRINTF(x) Serial.printf (x)
|
#define DEBUG_PRINTF(x) Serial.printf (x)
|
||||||
unsigned long debugTime = 0;
|
unsigned long debugTime = 0;
|
||||||
int lastWifiState = 3;
|
int lastWifiState = 3;
|
||||||
unsigned long wifiStateChangedTime = 0;
|
unsigned long wifiStateChangedTime = 0;
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PRINT(x)
|
#define DEBUG_PRINT(x)
|
||||||
#define DEBUG_PRINTLN(x)
|
#define DEBUG_PRINTLN(x)
|
||||||
#define DEBUG_PRINTF(x)
|
#define DEBUG_PRINTF(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//filesystem
|
//filesystem
|
||||||
#ifndef WLED_DISABLE_FILESYSTEM
|
#ifndef WLED_DISABLE_FILESYSTEM
|
||||||
#include <FS.h>
|
#include <FS.h>
|
||||||
#ifdef ARDUINO_ARCH_ESP32
|
#ifdef ARDUINO_ARCH_ESP32
|
||||||
#include "SPIFFS.h"
|
#include "SPIFFS.h"
|
||||||
#endif
|
#endif
|
||||||
#include "SPIFFSEditor.h"
|
#include "SPIFFSEditor.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -564,9 +565,9 @@ void loop() {
|
|||||||
|
|
||||||
handleOverlays();
|
handleOverlays();
|
||||||
yield();
|
yield();
|
||||||
#ifdef WLED_USE_ANALOG_LEDS
|
#ifdef WLED_USE_ANALOG_LEDS
|
||||||
strip.setRgbwPwm();
|
strip.setRgbwPwm();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (doReboot) reset();
|
if (doReboot) reset();
|
||||||
|
|
||||||
@ -586,9 +587,9 @@ void loop() {
|
|||||||
if (!offMode) strip.service();
|
if (!offMode) strip.service();
|
||||||
}
|
}
|
||||||
yield();
|
yield();
|
||||||
#ifdef ESP8266
|
#ifdef ESP8266
|
||||||
MDNS.update();
|
MDNS.update();
|
||||||
#endif
|
#endif
|
||||||
if (millis() - lastMqttReconnectAttempt > 30000) initMqtt();
|
if (millis() - lastMqttReconnectAttempt > 30000) initMqtt();
|
||||||
|
|
||||||
//DEBUG serial logging
|
//DEBUG serial logging
|
||||||
|
Loading…
Reference in New Issue
Block a user