mirror of
https://github.com/wled/WLED.git
synced 2025-04-24 23:07:19 +00:00
Add dmx input port to configuration
This commit is contained in:
parent
2cc5a29b86
commit
84eb6fd460
@ -156,6 +156,7 @@ Realtime LED offset: <input name="WO" type="number" min="-255" max="255" require
|
||||
DMX RX: <input name="IDMR" type="number" min="-1" max="99"><br/>
|
||||
DMX TX: <input name="IDMT" type="number" min="-1" max="99"><br/>
|
||||
DMX Enable: <input name="IDME" type="number" min="-1" max="99"><br/>
|
||||
DMX Port: <input name="IDMP" type="number" min="1" max="2"><br/>
|
||||
</div>
|
||||
<div id="dmxInputOff"> <!--WLEDMM-->
|
||||
<br><em style="color:darkorange">This firmware build does not include DMX Input support. <br></em>
|
||||
|
@ -423,7 +423,9 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
#ifdef WLED_ENABLE_DMX_INPUT
|
||||
dmxInputTransmitPin = request->arg(F("IDMT")).toInt();
|
||||
dmxInputReceivePin = request->arg(F("IDMR")).toInt();
|
||||
dmxInputEnablePin= request->arg(F("IDME")).toInt();
|
||||
dmxInputEnablePin = request->arg(F("IDME")).toInt();
|
||||
dmxInputPort = request->arg(F("IDMP")).toInt();
|
||||
if(dmxInputPort <= 0 || dmxInputPort > 2) dmxInputPort = 2;
|
||||
#endif
|
||||
|
||||
#ifndef WLED_DISABLE_ALEXA
|
||||
|
@ -541,8 +541,7 @@ void WLED::setup()
|
||||
initDMX();
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_INPUT
|
||||
const uint8_t dmxInputPortNumber = 2; //TODO turn into config variable?!
|
||||
dmxInput.init(dmxInputReceivePin, dmxInputTransmitPin, dmxInputEnablePin, dmxInputPortNumber);
|
||||
dmxInput.init(dmxInputReceivePin, dmxInputTransmitPin, dmxInputEnablePin, dmxInputPort);
|
||||
#endif
|
||||
|
||||
#ifdef WLED_ENABLE_ADALIGHT
|
||||
|
@ -467,6 +467,7 @@ WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to f
|
||||
WLED_GLOBAL int dmxInputTransmitPin _INIT(0);
|
||||
WLED_GLOBAL int dmxInputReceivePin _INIT(0);
|
||||
WLED_GLOBAL int dmxInputEnablePin _INIT(0);
|
||||
WLED_GLOBAL int dmxInputPort _INIT(2);
|
||||
WLED_GLOBAL DMXInput dmxInput;
|
||||
#endif
|
||||
|
||||
|
@ -446,6 +446,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
||||
sappend('v',SET_F("IDMT"),dmxInputTransmitPin);
|
||||
sappend('v',SET_F("IDMR"),dmxInputReceivePin);
|
||||
sappend('v',SET_F("IDME"),dmxInputEnablePin);
|
||||
sappend('v',SET_F("IDMP"),dmxInputPort);
|
||||
#endif
|
||||
printSetFormValue(settingsScript,PSTR("DA"),DMXAddress);
|
||||
printSetFormValue(settingsScript,PSTR("XX"),DMXSegmentSpacing);
|
||||
|
Loading…
x
Reference in New Issue
Block a user