@@ -133,6 +133,7 @@ class Bus {
133133 virtual uint16_t getUsedCurrent () const { return 0 ; }
134134 virtual uint16_t getMaxCurrent () const { return 0 ; }
135135 virtual size_t getBusSize () const { return sizeof (Bus); }
136+ virtual const String getCustomText () const { return String (); }
136137
137138 inline bool hasRGB () const { return _hasRgb; }
138139 inline bool hasWhite () const { return _hasWhite; }
@@ -215,7 +216,7 @@ class Bus {
215216 uint8_t _autoWhiteMode;
216217 // global Auto White Calculation override
217218 static uint8_t _gAWM;
218- // _cct has the following menaings (see calculateCCT() & BusManager::setSegmentCCT()):
219+ // _cct has the following meanings (see calculateCCT() & BusManager::setSegmentCCT()):
219220 // -1 means to extract approximate CCT value in K from RGB (in calcualteCCT())
220221 // [0,255] is the exact CCT value where 0 means warm and 255 cold
221222 // [1900,10060] only for color correction expressed in K (colorBalanceFromKelvin())
@@ -342,6 +343,10 @@ class BusNetwork : public Bus {
342343 size_t getBusSize () const override { return sizeof (BusNetwork) + (isOk () ? _len * _UDPchannels : 0 ); }
343344 void show () override ;
344345 void cleanup ();
346+ #ifdef ARDUINO_ARCH_ESP32
347+ void resolveHostname ();
348+ const String getCustomText () const override { return _hostname; }
349+ #endif
345350
346351 static std::vector<LEDType> getLEDTypes ();
347352
@@ -351,6 +356,9 @@ class BusNetwork : public Bus {
351356 uint8_t _UDPchannels;
352357 bool _broadcastLock;
353358 uint8_t *_data;
359+ #ifdef ARDUINO_ARCH_ESP32
360+ String _hostname;
361+ #endif
354362};
355363
356364
@@ -368,8 +376,9 @@ struct BusConfig {
368376 uint16_t frequency;
369377 uint8_t milliAmpsPerLed;
370378 uint16_t milliAmpsMax;
379+ String text;
371380
372- BusConfig (uint8_t busType, uint8_t * ppins, uint16_t pstart, uint16_t len = 1 , uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false , uint8_t skip = 0 , byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U , uint8_t maPerLed=LED_MILLIAMPS_DEFAULT, uint16_t maMax=ABL_MILLIAMPS_DEFAULT)
381+ BusConfig (uint8_t busType, uint8_t * ppins, uint16_t pstart, uint16_t len = 1 , uint8_t pcolorOrder = COL_ORDER_GRB, bool rev = false , uint8_t skip = 0 , byte aw=RGBW_MODE_MANUAL_ONLY, uint16_t clock_kHz=0U , uint8_t maPerLed=LED_MILLIAMPS_DEFAULT, uint16_t maMax=ABL_MILLIAMPS_DEFAULT, String sometext = " " )
373382 : count(std::max(len,(uint16_t )1 ))
374383 , start(pstart)
375384 , colorOrder(pcolorOrder)
@@ -379,6 +388,7 @@ struct BusConfig {
379388 , frequency(clock_kHz)
380389 , milliAmpsPerLed(maPerLed)
381390 , milliAmpsMax(maMax)
391+ , text(sometext)
382392 {
383393 refreshReq = (bool ) GET_BIT (busType,7 );
384394 type = busType & 0x7F ; // bit 7 may be/is hacked to include refresh info (1=refresh in off state, 0=no refresh)
0 commit comments