@@ -141,6 +141,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
141141 unsigned colorOrder, type, skip, awmode, channelSwap, maPerLed;
142142 unsigned length, start, maMax;
143143 uint8_t pins[5 ] = {255 , 255 , 255 , 255 , 255 };
144+ String text;
144145
145146 // this will set global ABL max current used when per-port ABL is not used
146147 unsigned ablMilliampsMax = request->arg (F (" MA" )).toInt ();
@@ -174,6 +175,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
174175 char sp[4 ] = " SP" ; sp[2 ] = offset+s; sp[3 ] = 0 ; // bus clock speed (DotStar & PWM)
175176 char la[4 ] = " LA" ; la[2 ] = offset+s; la[3 ] = 0 ; // LED mA
176177 char ma[4 ] = " MA" ; ma[2 ] = offset+s; ma[3 ] = 0 ; // max mA
178+ char hs[4 ] = " HS" ; hs[2 ] = offset+s; hs[3 ] = 0 ; // hostname (for network types, custom text for others)
177179 if (!request->hasArg (lp)) {
178180 DEBUG_PRINTF_P (PSTR (" # of buses: %d\n " ), s+1 );
179181 break ;
@@ -224,9 +226,10 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
224226 maMax = request->arg (ma).toInt () * request->hasArg (F (" PPL" )); // if PP-ABL is disabled maMax (per bus) must be 0
225227 }
226228 type |= request->hasArg (rf) << 7 ; // off refresh override
229+ text = request->arg (hs).substring (0 ,31 );
227230 // actual finalization is done in WLED::loop() (removing old busses and adding new)
228231 // this may happen even before this loop is finished so we do "doInitBusses" after the loop
229- busConfigs.emplace_back (type, pins, start, length, colorOrder | (channelSwap<<4 ), request->hasArg (cv), skip, awmode, freq, maPerLed, maMax);
232+ busConfigs.emplace_back (type, pins, start, length, colorOrder | (channelSwap<<4 ), request->hasArg (cv), skip, awmode, freq, maPerLed, maMax, text );
230233 busesChanged = true ;
231234 }
232235 // doInitBusses = busesChanged; // we will do that below to ensure all input data is processed
0 commit comments