DMX settings only when enabled
This commit is contained in:
parent
5ffd29e31a
commit
7360b882ac
@ -262,13 +262,14 @@ bool aOtaEnabled = true; //ArduinoOTA allows easy updates d
|
||||
|
||||
uint16_t userVar0 = 0, userVar1 = 0;
|
||||
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
//dmx CONFIG
|
||||
uint16_t DMXChannels = 7; // number of channels per fixture
|
||||
uint16_t DMXFixtureMap[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
byte DMXChannels = 7; // number of channels per fixture
|
||||
byte DMXFixtureMap[15] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
// assigns the different channels to different functions. See wled21_dmx.ino for more information.
|
||||
uint16_t DMXGap = 10; // gap between the fixtures. makes addressing easier because you don't have to memorize odd numbers when climbing up onto a rig.
|
||||
uint16_t DMXStart = 10; // start address of the first fixture
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
//internal global variable declarations
|
||||
|
@ -258,6 +258,7 @@ void saveSettingsToEEPROM()
|
||||
EEPROM.write(2523, (mqttPort >> 8) & 0xFF);
|
||||
|
||||
// DMX (2530 - 2549)
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
EEPROM.write(2530, DMXChannels);
|
||||
EEPROM.write(2531, DMXGap & 0xFF);
|
||||
EEPROM.write(2532, (DMXGap >> 8) & 0xFF);
|
||||
@ -267,6 +268,7 @@ void saveSettingsToEEPROM()
|
||||
for (int i=0; i<15; i++) {
|
||||
EEPROM.write(2535+i, DMXFixtureMap[i]);
|
||||
} // last used: 2549. maybe leave a few bytes for future expansion and go on with 2600 kthxbye.
|
||||
#endif
|
||||
|
||||
commit();
|
||||
}
|
||||
@ -536,7 +538,7 @@ void loadSettingsFromEEPROM(bool first)
|
||||
readStringFromEEPROM(2220, blynkApiKey, 35);
|
||||
if (strlen(blynkApiKey) < 25) blynkApiKey[0] = 0;
|
||||
|
||||
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
// DMX (2530 - 2549)2535
|
||||
DMXChannels = EEPROM.read(2530);
|
||||
DMXGap = EEPROM.read(2531) + ((EEPROM.read(2532) << 8) & 0xFF00);
|
||||
@ -545,7 +547,7 @@ void loadSettingsFromEEPROM(bool first)
|
||||
for (int i=0;i<15;i++) {
|
||||
DMXFixtureMap[i] = EEPROM.read(2535+i);
|
||||
} //last used: 2549. maybe leave a few bytes for future expansion and go on with 2600 kthxbye.
|
||||
|
||||
#endif
|
||||
|
||||
//user MOD memory
|
||||
//2944 - 3071 reserved
|
||||
|
Loading…
Reference in New Issue
Block a user