DMX Support for WLED (#704)
* initial dmx setup * adds support for multiple fixtures, addr gaps, start addresses and all that good DMX stuff * removes init function. do not need. * adds some comments, removes others. words. * added menu entry and dummy HTML * added server request handler * cloned options page UI for DMX * only add code when DMX is enabled * added infobutton to HTML * DMX settings form * procedurally generated HTML form. OBACHT: Values still not coming from the EEPROM. * upped eeprom version to 15 * changed index for set to 255 to 6 because web interface wants it that way * gets values for XML from actual settings * changes the default values for dmx to blanks * reads and writes DMX settings from EEPROM (2550 - 2569) * fixes addressing bug in DMX EEPROM read * saves settings from WebUI to memory * disables DMX by default * changed a comment in the ENABLE_DMX line * makes the display of the DMX entry in settings dependant on WLED_DMX_ENABLE * adds the server listener for the DMX map * fixes a bug when selecting 255 for a channel at the dmx settings page * now actually reads the DMX settings back to the HTML UI. * cleans up a little * adds a warning message to the HTML UI when setting up defunct DMX settings * changed DMX EEPROM addressing to close a gap * basic DMX map * fixes a few styling flaws and bugs in the DMX map * changes config variables to uint16_t Co-authored-by: Aircoookie <cschwinne@gmail.com>
This commit is contained in:
@@ -162,7 +162,7 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
obuf = dest;
|
||||
olen = 0;
|
||||
|
||||
if (subPage <1 || subPage >6) return;
|
||||
if (subPage <1 || subPage >7) return;
|
||||
|
||||
if (subPage == 1) {
|
||||
sappends('s',"CS",clientSSID);
|
||||
@@ -391,5 +391,30 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
oappendi(VERSION);
|
||||
oappend(") OK\";");
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX // include only if DMX is enabled
|
||||
if (subPage == 7)
|
||||
{
|
||||
sappend('v',"CN",DMXChannels);
|
||||
sappend('v',"CG",DMXGap);
|
||||
sappend('v',"CS",DMXStart);
|
||||
|
||||
sappend('i',"CH1",DMXFixtureMap[0]);
|
||||
sappend('i',"CH2",DMXFixtureMap[1]);
|
||||
sappend('i',"CH3",DMXFixtureMap[2]);
|
||||
sappend('i',"CH4",DMXFixtureMap[3]);
|
||||
sappend('i',"CH5",DMXFixtureMap[4]);
|
||||
sappend('i',"CH6",DMXFixtureMap[5]);
|
||||
sappend('i',"CH7",DMXFixtureMap[6]);
|
||||
sappend('i',"CH8",DMXFixtureMap[7]);
|
||||
sappend('i',"CH9",DMXFixtureMap[8]);
|
||||
sappend('i',"CH10",DMXFixtureMap[9]);
|
||||
sappend('i',"CH11",DMXFixtureMap[10]);
|
||||
sappend('i',"CH12",DMXFixtureMap[11]);
|
||||
sappend('i',"CH13",DMXFixtureMap[12]);
|
||||
sappend('i',"CH14",DMXFixtureMap[13]);
|
||||
sappend('i',"CH15",DMXFixtureMap[14]);
|
||||
}
|
||||
#endif
|
||||
oappend("}</script>");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user