Skip to content

Commit

Permalink
Add dmx input port to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
arneboe committed Aug 23, 2023
1 parent a2da24f commit 9169b8e
Show file tree
Hide file tree
Showing 11 changed files with 3,774 additions and 3,720 deletions.
1 change: 1 addition & 0 deletions wled00/data/settings_sync.htm
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ <h3>Realtime</h3>
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>
Expand Down
2 changes: 1 addition & 1 deletion wled00/html_cpal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Autogenerated from wled00/data/cpal/cpal.htm, do not edit!!
const uint16_t PAGE_cpal_L = 4721;
const uint8_t PAGE_cpal[] PROGMEM = {
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0a, 0xbd, 0x3b, 0x7f, 0x73, 0xdb, 0xb6,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0xbd, 0x3b, 0x7f, 0x73, 0xdb, 0xb6,
0x92, 0xff, 0xe7, 0x53, 0x20, 0x4c, 0x5f, 0x42, 0xd6, 0x14, 0x45, 0xd2, 0xb6, 0x64, 0x4b, 0xa2,
0x3b, 0xa9, 0x93, 0x77, 0xce, 0x8d, 0xdd, 0x64, 0x5e, 0x7c, 0x6e, 0x7b, 0x3e, 0xbf, 0x31, 0x4d,
0x42, 0x12, 0x1b, 0x8a, 0xe0, 0x03, 0x21, 0xd9, 0xae, 0xac, 0xef, 0x7e, 0xbb, 0x00, 0x48, 0x91,
Expand Down
1,500 changes: 750 additions & 750 deletions wled00/html_other.h

Large diffs are not rendered by default.

998 changes: 524 additions & 474 deletions wled00/html_pixart.h

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions wled00/html_settings.h

Large diffs are not rendered by default.

2,280 changes: 1,140 additions & 1,140 deletions wled00/html_simple.h

Large diffs are not rendered by default.

2,504 changes: 1,252 additions & 1,252 deletions wled00/html_ui.h

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion wled00/set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,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

alexaEnabled = request->hasArg(F("AL"));
Expand Down
3 changes: 1 addition & 2 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,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
Expand Down
1 change: 1 addition & 0 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this
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

Expand Down
1 change: 1 addition & 0 deletions wled00/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,7 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W
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
sappend('v',SET_F("DA"),DMXAddress);
sappend('v',SET_F("XX"),DMXSegmentSpacing);
Expand Down

0 comments on commit 9169b8e

Please sign in to comment.