expose refactoring to webUI:
add client stats add DMX settings (this increases EEPROM layout version)
This commit is contained in:
parent
76f704b060
commit
d9a8dac266
@ -88,6 +88,14 @@
|
||||
Multicast mode: <input type="checkbox" name="EM"><br>
|
||||
E1.31 start universe: <input name="EU" type="number" min="1" max="63999" required><br>
|
||||
<i>Reboot required.</i> Check out <a href="https://github.com/ahodges9/LedFx" target="_blank">LedFx</a>!<br><br>
|
||||
DMX start address: <input name="DA" type="number" min="1" max="510" value="1" required><br>
|
||||
DMX mode: <input name="DM" type="radio" value="0"> disabled<br>
|
||||
<input name="DM" type="radio" value="1"> Single RGB (3 Channels for all LEDs: Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="2"> Single DRGB (4 Channels for all LEDs: Dimmer Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="3"> Effect (11 Channels parametrizing Effects: Dimmer Effect Speed Intensity Palette PriRed PriGreen PriBlue SecRed SecGreen SecBlue)<br>
|
||||
<input name="DM" type="radio" value="4"> Multiple RGB (3 Channels for each LED: Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="5"> Multiple DRGB (1+3 Channels for each LED: Dimmer Red1 Green1 Blue1 Red2 Green2 Blue2...)<br>
|
||||
<i>Reboot required.</i> Check out <a href="https://github.com/ahodges9/LedFx" target="_blank">LedFx</a>!<br><br>
|
||||
Timeout: <input name="ET" type="number" min="100" max="65000" required> ms<br>
|
||||
Force max brightness: <input type="checkbox" name="FB"><br>
|
||||
Disable realtime gamma correction: <input type="checkbox" name="RG"><br>
|
||||
|
@ -206,6 +206,13 @@ Receive UDP realtime: <input type="checkbox" name="RD"><br><br>
|
||||
Use E1.31 multicast: <input type="checkbox" name="EM"><br>
|
||||
E1.31 start universe: <input name="EU" type="number" min="1" max="63999" required><br>
|
||||
<i>Reboot required.</i> Check out <a href="https://github.com/ahodges9/LedFx" target="_blank">LedFx</a>!<br><br>
|
||||
DMX start address: <input name="DA" type="number" min="1" max="510" value="1" required><br>
|
||||
DMX mode: <input name="DM" type="radio" value="0"> disabled<br>
|
||||
<input name="DM" type="radio" value="1"> Single RGB (3 Channels for all LEDs: Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="2"> Single DRGB (4 Channels for all LEDs: Dimmer Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="3"> Effect (11 Channels parametrizing Effects: Dimmer Effect Speed Intensity Palette PriRed PriGreen PriBlue SecRed SecGreen SecBlue)<br>
|
||||
<input name="DM" type="radio" value="4"> Multiple RGB (3 Channels for each LED: Red Green Blue)<br>
|
||||
<input name="DM" type="radio" value="5"> Multiple DRGB (1+3 Channels for each LED: Dimmer Red1 Green1 Blue1 Red2 Green2 Blue2...)<br>
|
||||
Timeout: <input name="ET" type="number" min="1" max="65000" required> ms<br>
|
||||
Force max brightness: <input type="checkbox" name="FB"><br>
|
||||
Disable realtime gamma correction: <input type="checkbox" name="RG"><br>
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define EEPSIZE 2560
|
||||
|
||||
//eeprom Version code, enables default settings instead of 0 init on update
|
||||
#define EEPVER 14
|
||||
#define EEPVER 15
|
||||
//0 -> old version, default
|
||||
//1 -> 0.4p 1711272 and up
|
||||
//2 -> 0.4p 1711302 and up
|
||||
@ -22,6 +22,7 @@
|
||||
//12-> 0.8.7-dev
|
||||
//13-> 0.9.0-dev
|
||||
//14-> 0.9.0-b1
|
||||
//15-> 0.9.0-b3
|
||||
|
||||
void commit()
|
||||
{
|
||||
@ -211,6 +212,9 @@ void saveSettingsToEEPROM()
|
||||
EEPROM.write(2194, (realtimeTimeoutMs >> 8) & 0xFF);
|
||||
EEPROM.write(2195, arlsForceMaxBri);
|
||||
EEPROM.write(2196, arlsDisableGammaCorrection);
|
||||
EEPROM.write(2197, DMXAddress & 0xFF);
|
||||
EEPROM.write(2198, (DMXAddress >> 8) & 0xFF);
|
||||
EEPROM.write(2199, DMXMode);
|
||||
|
||||
EEPROM.write(2200, !receiveDirect);
|
||||
EEPROM.write(2201, notifyMacro); //was enableRealtime
|
||||
@ -471,6 +475,13 @@ void loadSettingsFromEEPROM(bool first)
|
||||
syncToggleReceive = false;
|
||||
}
|
||||
|
||||
if (lastEEPROMversion > 14)
|
||||
{
|
||||
DMXAddress = EEPROM.read(2197) + ((EEPROM.read(2198) << 8) & 0xFF00);
|
||||
DMXMode = EEPROM.read(2199);
|
||||
}
|
||||
|
||||
|
||||
receiveDirect = !EEPROM.read(2200);
|
||||
notifyMacro = EEPROM.read(2201);
|
||||
|
||||
|
@ -63,7 +63,21 @@ char* XML_response(AsyncWebServerRequest *request, char* dest = nullptr)
|
||||
String mesg = "Live ";
|
||||
if (realtimeIP[0] == 0)
|
||||
{
|
||||
mesg += "E1.31 mode";
|
||||
mesg += "E1.31 mode ";
|
||||
mesg += DMXMode;
|
||||
mesg += " at fixture DMX Address ";
|
||||
mesg += DMXAddress;
|
||||
mesg += " from '";
|
||||
mesg += e131ClientUA;
|
||||
mesg += "' (";
|
||||
mesg += e131ClientIP[0];
|
||||
for (int i = 1; i < 4; i++)
|
||||
{
|
||||
mesg += ".";
|
||||
mesg += e131ClientIP[i];
|
||||
}
|
||||
mesg += ") seq=";
|
||||
mesg += e131LastSequenceNumber;
|
||||
} else {
|
||||
mesg += "UDP from ";
|
||||
mesg += realtimeIP[0];
|
||||
@ -263,6 +277,8 @@ void getSettingsJS(byte subPage, char* dest)
|
||||
sappend('c',"RD",receiveDirect);
|
||||
sappend('c',"EM",e131Multicast);
|
||||
sappend('v',"EU",e131Universe);
|
||||
sappend('v',"DA",DMXAddress);
|
||||
sappend('v',"DM",DMXMode);
|
||||
sappend('v',"ET",realtimeTimeoutMs);
|
||||
sappend('c',"FB",arlsForceMaxBri);
|
||||
sappend('c',"RG",arlsDisableGammaCorrection);
|
||||
|
@ -138,6 +138,10 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
e131Multicast = request->hasArg("EM");
|
||||
t = request->arg("EU").toInt();
|
||||
if (t > 0 && t <= 63999) e131Universe = t;
|
||||
t = request->arg("DA").toInt();
|
||||
if (t > 0 && t <= 510) DMXAddress = t;
|
||||
t = request->arg("DM").toInt();
|
||||
if (t >= DMX_MODE_DISABLED && t <= DMX_MODE_MULTIPLE_DRGB) DMXMode = t;
|
||||
t = request->arg("ET").toInt();
|
||||
if (t > 99 && t <= 65000) realtimeTimeoutMs = t;
|
||||
arlsForceMaxBri = request->hasArg("FB");
|
||||
|
Loading…
Reference in New Issue
Block a user