align DMX output drivers with upstream
imports a few DMX serial output improvement from upstream
This commit is contained in:
@@ -11,12 +11,13 @@
|
|||||||
// - - - - -
|
// - - - - -
|
||||||
|
|
||||||
/* ----- LIBRARIES ----- */
|
/* ----- LIBRARIES ----- */
|
||||||
#ifdef ESP8266
|
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
#include "ESPDMX.h"
|
#include "ESPDMX.h"
|
||||||
|
|
||||||
|
#pragma message "using ESPDMX"
|
||||||
|
|
||||||
|
|
||||||
#define dmxMaxChannel 512
|
#define dmxMaxChannel 512
|
||||||
@@ -30,8 +31,8 @@
|
|||||||
bool dmxStarted = false;
|
bool dmxStarted = false;
|
||||||
int sendPin = 2; //default on ESP8266
|
int sendPin = 2; //default on ESP8266
|
||||||
|
|
||||||
//DMX value array and size. Entry 0 will hold startbyte
|
//DMX value array and size. Entry 0 will hold startbyte, so we need 512+1 elements
|
||||||
uint8_t dmxDataStore[dmxMaxChannel] = {};
|
uint8_t dmxDataStore[dmxMaxChannel+1] = {};
|
||||||
int channelSize;
|
int channelSize;
|
||||||
|
|
||||||
|
|
||||||
@@ -106,4 +107,4 @@ void DMXESPSerial::update() {
|
|||||||
|
|
||||||
// Function to update the DMX bus
|
// Function to update the DMX bus
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Distributed as-is; no warranty is given.
|
|||||||
#include "SparkFunDMX.h"
|
#include "SparkFunDMX.h"
|
||||||
#include <HardwareSerial.h>
|
#include <HardwareSerial.h>
|
||||||
|
|
||||||
|
#pragma message "using SparkFunDMX"
|
||||||
|
|
||||||
#define dmxMaxChannel 512
|
#define dmxMaxChannel 512
|
||||||
#define defaultMax 32
|
#define defaultMax 32
|
||||||
|
|
||||||
@@ -34,8 +36,8 @@ static const int enablePin = -1; // disable the enable pin because it is not ne
|
|||||||
static const int rxPin = -1; // disable the receiving pin because it is not needed - softhack007: Pin=-1 means "use default" not "disable"
|
static const int rxPin = -1; // disable the receiving pin because it is not needed - softhack007: Pin=-1 means "use default" not "disable"
|
||||||
static const int txPin = 2; // transmit DMX data over this pin (default is pin 2)
|
static const int txPin = 2; // transmit DMX data over this pin (default is pin 2)
|
||||||
|
|
||||||
//DMX value array and size. Entry 0 will hold startbyte
|
//DMX value array and size. Entry 0 will hold startbyte, so we need 512+1 elements
|
||||||
static uint8_t dmxData[dmxMaxChannel] = { 0 };
|
static uint8_t dmxData[dmxMaxChannel+1] = { 0 };
|
||||||
static int chanSize = 0;
|
static int chanSize = 0;
|
||||||
#if !defined(DMX_SEND_ONLY)
|
#if !defined(DMX_SEND_ONLY)
|
||||||
static int currentChannel = 0;
|
static int currentChannel = 0;
|
||||||
|
|||||||
@@ -164,7 +164,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
#ifdef ESP8266
|
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||||
#include "src/dependencies/dmx/ESPDMX.h"
|
#include "src/dependencies/dmx/ESPDMX.h"
|
||||||
#else //ESP32
|
#else //ESP32
|
||||||
#include "src/dependencies/dmx/SparkFunDMX.h"
|
#include "src/dependencies/dmx/SparkFunDMX.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user