Merge branch 'mdev' into dmx_input
This commit is contained in:
@@ -46,6 +46,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
if (passlen == 0 || (passlen > 7 && !isAsterisksOnly(request->arg(F("AP")).c_str(), 65))) strlcpy(apPass, request->arg(F("AP")).c_str(), 65);
|
||||
int t = request->arg(F("AC")).toInt(); if (t > 0 && t < 14) apChannel = t;
|
||||
|
||||
force802_3g = request->hasArg(F("FG"));
|
||||
noWifiSleep = request->hasArg(F("WS"));
|
||||
|
||||
#ifndef WLED_DISABLE_ESPNOW
|
||||
@@ -131,7 +132,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
pins[i] = (request->arg(lp).length() > 0) ? request->arg(lp).toInt() : 255;
|
||||
}
|
||||
type = request->arg(lt).toInt();
|
||||
type |= request->hasArg(rf) << 7; // off refresh override
|
||||
skip = request->arg(sl).toInt();
|
||||
colorOrder = request->arg(co).toInt();
|
||||
start = (request->hasArg(ls)) ? request->arg(ls).toInt() : t;
|
||||
@@ -163,7 +163,8 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
} else {
|
||||
freqHz = 0;
|
||||
}
|
||||
channelSwap = (type == TYPE_SK6812_RGBW || type == TYPE_TM1814) ? request->arg(wo).toInt() : 0;
|
||||
channelSwap = Bus::hasWhite(type) ? request->arg(wo).toInt() : 0;
|
||||
type |= request->hasArg(rf) << 7; // off refresh override
|
||||
// actual finalization is done in WLED::loop() (removing old busses and adding new)
|
||||
// this may happen even before this loop is finished so we do "doInitBusses" after the loop
|
||||
if (busConfigs[s] != nullptr) delete busConfigs[s];
|
||||
@@ -186,7 +187,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
}
|
||||
busses.updateColorOrderMap(com);
|
||||
|
||||
// upate other pins
|
||||
// update other pins
|
||||
int hw_ir_pin = request->arg(F("IR")).toInt();
|
||||
if (pinManager.allocatePin(hw_ir_pin,false, PinOwner::IR)) {
|
||||
irPin = hw_ir_pin;
|
||||
@@ -428,7 +429,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
|
||||
//start ntp if not already connected
|
||||
if (ntpEnabled && WLED_CONNECTED && !ntpConnected) ntpConnected = ntpUdp.begin(ntpLocalPort);
|
||||
ntpLastSyncTime = 0; // force new NTP query
|
||||
ntpLastSyncTime = NTP_NEVER; // force new NTP query
|
||||
|
||||
longitude = request->arg(F("LN")).toFloat();
|
||||
latitude = request->arg(F("LT")).toFloat();
|
||||
@@ -611,7 +612,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
i2c_scl = hw_scl_pin;
|
||||
DEBUG_PRINTF("handleSettingsSet(): reserved I2C pins SDA=%d SCL=%d.\n", i2c_sda, i2c_scl);
|
||||
#ifdef ESP32
|
||||
Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initilised (Wire.begin() called)
|
||||
Wire.setPins(i2c_sda, i2c_scl); // this will fail if Wire is initialised (Wire.begin() called)
|
||||
#endif
|
||||
// Wire.begin(); // WLEDMM moved into pinManager
|
||||
} else {
|
||||
@@ -712,10 +713,10 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
DEBUG_PRINTLN(value);
|
||||
} else {
|
||||
// we are using a hidden field with the same name as our parameter (!before the actual parameter!)
|
||||
// to describe the type of parameter (text,float,int), for boolean patameters the first field contains "off"
|
||||
// to describe the type of parameter (text,float,int), for boolean parameters the first field contains "off"
|
||||
// so checkboxes have one or two fields (first is always "false", existence of second depends on checkmark and may be "true")
|
||||
if (subObj[name].isNull()) {
|
||||
// the first occurence of the field describes the parameter type (used in next loop)
|
||||
// the first occurrence of the field describes the parameter type (used in next loop)
|
||||
if (value == "false") subObj[name] = false; // checkboxes may have only one field
|
||||
else subObj[name] = value;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user