2020-10-13 17:01:29 +02:00
# include "LedDisplayController.h"
2020-10-14 23:54:54 +02:00
// --------------------
// - Public functions -
// --------------------
void LedDisplayController : : loop ( )
2020-10-13 17:01:29 +02:00
{
2020-10-18 22:48:29 +02:00
//Serial.printf("Ligth: %d \n" , analogRead(36));
2022-07-28 10:11:12 +02:00
storeDataToEEPROM ( ) ;
2020-10-14 23:54:54 +02:00
if ( this - > disp_show )
{
2020-10-28 09:17:33 +01:00
measureBrightnessEnv ( ) ;
2020-10-14 23:54:54 +02:00
disp_start_set ( ) ;
if ( true = = text_sets . sets [ text_curr_nr ] . active )
2020-10-13 17:01:29 +02:00
{
2022-07-28 10:11:12 +02:00
if ( text_sets . sets [ text_curr_nr ] . text [ 0 ] ! = ' \0 ' )
2020-10-13 17:01:29 +02:00
{
2020-10-14 23:54:54 +02:00
if ( text_sets . sets [ text_curr_nr ] . scroll )
2020-10-13 17:01:29 +02:00
{
2020-10-14 23:54:54 +02:00
disp_scroll_text ( ) ;
2020-10-13 17:01:29 +02:00
}
}
}
2020-10-14 23:54:54 +02:00
}
}
2022-07-28 10:11:12 +02:00
bool LedDisplayController : : storeDataToEEPROM ( )
{
if ( millis ( ) - this - > setsModiefiedLastTime_ms > this - > msToWaitBeforeModifyGetsInactive )
{
if ( true = = this - > setModifyingActive )
{
this - > setModifyingActive = false ;
Serial . println ( " Sets are not longer modified by external data ... " ) ;
Serial . println ( " Storing Text Sets To EEPROM now... " ) ;
if ( this - > eepromUnit = = nullptr )
{
Serial . println ( " ERROR " ) ;
return false ;
}
strncpy ( this - > text_sets . valid , " OK " , sizeof ( this - > text_sets . valid ) ) ;
this - > eepromUnit - > write ( this - > text_sets ) ;
Serial . println ( " OK " ) ;
return true ;
}
}
return true ;
}
2020-10-15 22:54:20 +02:00
bool LedDisplayController : : registerEepromUnit ( EepromManager * eepromManager )
{
if ( this - > eepromUnit ! = nullptr )
return false ;
this - > eepromUnit = eepromManager - > registerEempromUnit ( sizeof ( sets_t ) ) ;
return this - > loadTextSets ( ) ;
}
2020-10-14 23:54:54 +02:00
String LedDisplayController : : getTextSetParameter ( int index , DisplayTextSetParameter parameter )
{
2020-10-15 00:02:48 +02:00
if ( index < 0 | | index > this - > maximumTextSets | | parameter < 0 | | parameter > = DisplayTextSetParameterCount )
2020-10-14 23:54:54 +02:00
return " " ;
String value = " " ;
this - > getSetTextSetParameter ( index , parameter , & value ) ;
return value ;
}
LedDisplayController : : GetSetTextSetParameterExitCode LedDisplayController : : setTextSetParameter ( int index , DisplayTextSetParameter parameter , String value )
{
return this - > getSetTextSetParameter ( index , parameter , & value , true ) ;
}
int LedDisplayController : : getBrightness ( )
{
2020-10-18 00:18:50 +02:00
return this - > text_sets . disp_brightness ;
2020-10-13 17:01:29 +02:00
}
2020-10-14 23:54:54 +02:00
bool LedDisplayController : : setBrightness ( int brightness )
{
2020-10-18 00:18:50 +02:00
if ( brightness < 0 | | brightness > 255 )
2020-10-14 23:54:54 +02:00
return false ;
2020-10-18 22:48:29 +02:00
2020-10-18 00:18:50 +02:00
this - > text_sets . disp_brightness = brightness ;
2020-10-28 09:17:33 +01:00
this - > matrix - > SetBrightness ( adjustBrightnessToEnv ( ) ) ;
2020-10-18 22:48:29 +02:00
this - > matrix - > Show ( ) ;
this - > storeTextSets ( ) ;
2020-10-14 23:54:54 +02:00
return true ;
}
2020-10-18 16:26:24 +02:00
bool LedDisplayController : : getAutomaticBrightnessAdjustment ( )
{
return this - > text_sets . disp_automatic_brightness_adjustment ;
}
void LedDisplayController : : setAutomaticBrightnessAdjustment ( bool automaticBrightnessAdjustment )
{
this - > text_sets . disp_automatic_brightness_adjustment = automaticBrightnessAdjustment ;
2020-10-18 22:48:29 +02:00
this - > storeTextSets ( ) ;
2020-10-28 09:17:33 +01:00
brightness_init ( ) ;
measureBrightnessEnv ( ) ;
2020-10-18 16:26:24 +02:00
}
2020-10-14 23:54:54 +02:00
// ------------------
// - Matrix control -
// ------------------
2020-10-28 09:17:33 +01:00
void LedDisplayController : : brightness_init ( )
{
for ( uint8_t i = 0 ; i < meas_slots ; i + + )
this - > brightness_levels [ i ] = analogRead ( LDR_PIN ) ;
this - > current_meas_slot = 0 ;
this - > last_brightness_meas = millis ( ) ;
measureBrightnessEnv ( ) ;
}
2020-10-13 17:01:29 +02:00
void LedDisplayController : : disp_init ( )
{
text_curr_nr = 0 ;
text_set_starttime = 0 ;
text_pass = 0 ;
text_pos = this - > matrix - > width ( ) ;
disp_show = true ;
2020-10-18 00:18:50 +02:00
last_display_show_ms = 0 ;
default_display_show_wait_ms = 200 ;
display_show_wait_ms = 100 ;
2020-10-18 15:10:20 +02:00
text_no_activ_legal_sets = true ;
2020-10-13 17:01:29 +02:00
}
void LedDisplayController : : disp_start_set ( )
2020-10-18 16:26:24 +02:00
{
2020-10-18 15:10:20 +02:00
2020-10-18 16:26:24 +02:00
bool legal_entry_setting =
2020-10-18 15:10:20 +02:00
( 0 = = text_set_starttime ) | |
// current entry is not scrolling: maximum of runtime is defined and runtime is over
2020-10-18 16:26:24 +02:00
( ( text_sets . sets [ text_curr_nr ] . scroll = = false ) & & ( ( text_sets . sets [ text_curr_nr ] . runtime > 0 ) & & ( ( millis ( ) - text_set_starttime ) > = text_sets . sets [ text_curr_nr ] . runtime ) ) ) | |
2020-10-18 15:10:20 +02:00
// current entry is scrolling: but maximum number of scrolls is defined and reached
2020-10-18 16:26:24 +02:00
( ( text_sets . sets [ text_curr_nr ] . scroll = = true ) & & ( ( text_sets . sets [ text_curr_nr ] . scrollCount > 0 ) & & ( text_pass > = text_sets . sets [ text_curr_nr ] . scrollCount ) ) ) ;
bool illegal_entry_settings =
2020-10-18 15:10:20 +02:00
// current entry is not active
2020-10-18 16:26:24 +02:00
( text_sets . sets [ text_curr_nr ] . active = = false ) | |
2020-10-18 15:10:20 +02:00
// current entry has no text defined
2022-07-28 10:11:12 +02:00
( text_sets . sets [ text_curr_nr ] . text [ 0 ] = = ' \0 ' ) | |
2020-10-18 15:10:20 +02:00
// current entry is not scrolling: but no runtime is defined
2020-10-18 16:26:24 +02:00
( ( text_sets . sets [ text_curr_nr ] . scroll = = false ) & & ( text_sets . sets [ text_curr_nr ] . runtime = = 0 ) ) | |
2020-10-18 15:10:20 +02:00
// current entry is scrolling: but no scrollnumber defined
2020-10-18 16:26:24 +02:00
( ( text_sets . sets [ text_curr_nr ] . scroll = = true ) & & ( text_sets . sets [ text_curr_nr ] . scrollCount = = 0 ) ) ;
2020-10-18 15:10:20 +02:00
if ( legal_entry_setting | | illegal_entry_settings
//(((text_sets.sets[text_curr_nr].scrollCount == 0) || text_sets.sets[text_curr_nr].scroll == false) && (text_sets.sets[text_curr_nr].runtime == 0) ) //&& ((millis() - text_set_starttime) >= 10000))
2020-10-18 16:26:24 +02:00
)
2020-10-13 17:01:29 +02:00
{
2020-10-17 23:06:55 +02:00
2020-10-13 17:01:29 +02:00
//Serial.printf("[%lu] Meet start set condition. Curr set is %d. \n", millis(), text_curr_nr);
2020-10-18 16:26:24 +02:00
if ( 0 < text_set_starttime ) //|| text_sets.sets[text_curr_nr].text == '\0' || text_sets.sets[text_curr_nr].active == false)
2020-10-13 17:01:29 +02:00
text_curr_nr + + ;
2020-10-15 00:02:48 +02:00
if ( text_curr_nr = = maximumTextSets )
2020-10-18 15:10:20 +02:00
{
2020-10-13 17:01:29 +02:00
text_curr_nr = 0 ;
2020-10-18 16:26:24 +02:00
if ( false = = text_no_activ_legal_sets )
2020-10-18 15:10:20 +02:00
{
this - > matrix - > fillScreen ( 0 ) ;
this - > matrix - > Show ( ) ;
}
text_no_activ_legal_sets = false ;
}
2020-10-13 17:01:29 +02:00
text_pass = 0 ;
2020-10-18 16:26:24 +02:00
if ( text_sets . sets [ text_curr_nr ] . active & &
( ( ( text_sets . sets [ text_curr_nr ] . scroll = = false ) & & ( text_sets . sets [ text_curr_nr ] . runtime > 0 ) ) | | ( ( text_sets . sets [ text_curr_nr ] . scroll = = true ) & & ( text_sets . sets [ text_curr_nr ] . scrollCount > 0 ) ) ) )
2020-10-13 17:01:29 +02:00
{
2020-10-18 15:10:20 +02:00
text_no_activ_legal_sets = true ;
2020-10-14 23:54:54 +02:00
//Serial.printf("[%lu] Set %d. Runtime %d. Text:'%s'\n", millis(), text_curr_nr, text_sets.sets[text_curr_nr].runtime, text_sets.sets[text_curr_nr].text);
2020-10-13 17:01:29 +02:00
this - > matrix - > fillScreen ( 0 ) ;
textpixel = 6 * strlen ( text_sets . sets [ text_curr_nr ] . text ) ;
2020-10-18 15:10:20 +02:00
// scrolling text has always left or right allignment - depending on direction of scroll
2020-10-18 16:26:24 +02:00
if ( true = = text_sets . sets [ text_curr_nr ] . scroll )
2020-10-13 17:01:29 +02:00
{
2020-10-28 09:17:33 +01:00
if ( 0 = = text_sets . sets [ text_curr_nr ] . scrollDirection )
text_pos = this - > matrix - > width ( ) ;
else
text_pos = 0 - textpixel ;
}
else
{
switch ( text_sets . sets [ text_curr_nr ] . alignment )
{
case AlignLeft :
text_pos = 0 ;
break ;
case AlignRight :
text_pos = this - > matrix - > width ( ) - textpixel ;
break ;
case AlignCenter :
text_pos = this - > matrix - > width ( ) - textpixel ;
text_pos = text_pos / 2 ;
break ;
}
2020-10-13 17:01:29 +02:00
}
show_matrix ( text_sets . sets [ text_curr_nr ] . text , text_pos , text_sets . sets [ text_curr_nr ] . color ) ;
text_set_starttime = millis ( ) ;
}
}
2020-10-14 23:54:54 +02:00
else
{
2020-10-13 17:01:29 +02:00
//Serial.printf("[%lu] Don't meet start set condition. Text is: %s. Active is: %d\n", millis(), text_sets.sets[text_curr_nr].text, text_sets.sets[text_curr_nr].active);
}
}
2020-10-14 23:54:54 +02:00
void LedDisplayController : : disp_scroll_text ( )
2020-10-13 17:01:29 +02:00
{
2020-10-18 16:26:24 +02:00
2020-12-15 11:49:21 +01:00
if ( millis ( ) - last_display_show_ms > display_show_wait_ms & & text_sets . sets [ text_curr_nr ] . scrollSpeed ! = 0 )
2020-10-14 23:54:54 +02:00
{
2020-10-18 00:18:50 +02:00
last_display_show_ms = millis ( ) ;
2020-10-18 16:26:24 +02:00
display_show_wait_ms = ( ( 2 * default_display_show_wait_ms ) / text_sets . sets [ text_curr_nr ] . scrollSpeed ) ;
2020-10-18 15:10:20 +02:00
//Serial.printf("speed %d, waittime: %d' \n", text_sets.sets[text_curr_nr].scrollSpeed, display_show_wait_ms);
2020-10-18 00:18:50 +02:00
this - > matrix - > fillScreen ( 0 ) ;
show_matrix ( text_sets . sets [ text_curr_nr ] . text , text_pos , text_sets . sets [ text_curr_nr ] . color ) ;
2020-10-28 09:17:33 +01:00
if ( 0 = = text_sets . sets [ text_curr_nr ] . scrollDirection )
{
( int ) text_pos - - ;
if ( int ( text_pos + textpixel ) < 0 )
{
text_pos = this - > matrix - > width ( ) ;
text_pass + + ;
//Serial.printf("Pass[%d] - set nr %d, Text: '%s' \n", text_pass, text_curr_nr, text_sets.sets[text_curr_nr].text);
}
}
else
2020-10-18 00:18:50 +02:00
{
2020-10-28 09:17:33 +01:00
( int ) text_pos + + ;
if ( text_pos > this - > matrix - > width ( ) )
{
text_pos = 0 - textpixel ;
text_pass + + ;
//Serial.printf("Pass[%d] - set nr %d, Text: '%s' \n", text_pass, text_curr_nr, text_sets.sets[text_curr_nr].text);
}
2020-10-18 00:18:50 +02:00
}
2020-10-14 23:54:54 +02:00
}
}
void LedDisplayController : : show_matrix ( const char * text , int pos , const char * color )
{
//Serial.printf("TEXT: %s (pos=%d, color=%d)\n", text, pos, this->colorFromHex(String(color)));
2020-10-28 09:17:33 +01:00
this - > matrix - > SetBrightness ( adjustBrightnessToEnv ( ) ) ;
2020-10-14 23:54:54 +02:00
this - > matrix - > setTextColor ( this - > colorFromHex ( String ( color ) ) ) ;
2020-10-13 17:01:29 +02:00
this - > matrix - > setCursor ( pos , 0 ) ;
this - > matrix - > print ( text ) ;
2020-10-17 23:06:55 +02:00
//portDISABLE_INTERRUPTS();
this - > matrix - > Show ( ) ;
//portENABLE_INTERRUPTS();
2020-10-13 17:01:29 +02:00
}
2020-10-28 09:17:33 +01:00
uint8_t LedDisplayController : : adjustBrightnessToEnv ( void )
{
uint8_t brightness = ( pow ( 2 , ( this - > text_sets . disp_brightness / RFade ) ) ) ;
uint8_t brightness_adj = brightness * this - > brightness_adjust ;
//Serial.printf("brightness without adjust : %d . Adjust is: %f. Brightness with adjust : %d .\n", brightness, this->brightness_adjust, brightness_adj);
2020-11-14 20:44:23 +01:00
if ( brightness_adj < 1 )
brightness_adj = 1 ;
2020-10-28 09:17:33 +01:00
return brightness_adj ;
}
void LedDisplayController : : measureBrightnessEnv ( void )
{
if ( true = = this - > text_sets . disp_automatic_brightness_adjustment )
{
if ( millis ( ) - this - > last_brightness_meas > 1000 )
{
this - > brightness_levels [ this - > current_meas_slot ] = analogRead ( LDR_PIN ) ;
//Serial.printf("brightness last measured value = %d\n", brightness_levels[current_meas_slot]);
this - > current_meas_slot = this - > current_meas_slot + 1 > = this - > meas_slots ? 0 : this - > current_meas_slot + 1 ;
this - > last_brightness_meas = millis ( ) ;
uint16_t smallest = brightness_levels [ 0 ] ;
uint16_t biggest = brightness_levels [ 0 ] ;
uint64_t sum = brightness_levels [ 0 ] ;
for ( uint8_t i = 1 ; i < this - > meas_slots ; i + + )
{
sum = sum + this - > brightness_levels [ i ] ;
if ( this - > brightness_levels [ i ] < smallest )
smallest = this - > brightness_levels [ i ] ;
else
{
if ( this - > brightness_levels [ i ] > biggest )
biggest = this - > brightness_levels [ i ] ;
}
}
sum = sum - smallest - biggest ;
sum = sum / ( this - > meas_slots - 2 ) ;
//Serial.printf("brightness median value = %llu \n", sum);
float adjust = ( ( ( ( 100.0 / ( 4095.0 / 2.0 ) ) * ( float ) sum ) ) / 100.0 ) ;
adjust = adjust > 1.0 ? 1.0 : adjust ;
adjust = adjust < 0.2 ? 0.1 : adjust ;
this - > brightness_adjust = adjust ;
Serial . printf ( " brightness_adjust = %f \n " , this - > brightness_adjust ) ;
}
}
else
{
this - > brightness_adjust = 1.0 ;
}
}
2020-10-14 23:54:54 +02:00
uint16_t LedDisplayController : : colorFromHex ( String hex )
{
hex . replace ( " # " , " " ) ;
long number = ( long ) strtol ( & hex [ 0 ] , NULL , 16 ) ;
int r = number > > 16 ;
int g = number > > 8 & 0xFF ;
int b = number & 0xFF ;
//Serial.println("Color is: " + hex + " rgb are: r: " + r + " b: " + b + " g: " + g);
return this - > matrix - > Color ( r , g , b ) ;
}
// -------------------
// - Storage control -
// -------------------
LedDisplayController : : GetSetTextSetParameterExitCode LedDisplayController : : getSetTextSetParameter ( int index , DisplayTextSetParameter parameter , String * value , bool set )
{
if ( parameter < 0 | | parameter > = DisplayTextSetParameterCount )
return InvalidParameterError ;
2020-10-15 00:02:48 +02:00
else if ( index < 0 | | index > = this - > maximumTextSets )
2020-10-14 23:54:54 +02:00
return IndexOutOfRangeError ;
else if ( value = = nullptr )
return ValueIsNullptrError ;
else if ( strcmp ( this - > text_sets . valid , " OK " ) ! = 0 )
return InternalError ;
2020-10-18 16:26:24 +02:00
text_set_t * currentTextSet = & this - > text_sets . sets [ index ] ;
2020-10-14 23:54:54 +02:00
String returnValue = " " ;
switch ( parameter )
{
case TextParameter :
2020-10-15 22:54:20 +02:00
if ( set )
{
2020-12-15 11:04:41 +01:00
if ( * value = = " " ) {
2020-10-15 12:50:50 +02:00
// delete the index
2020-12-15 11:04:41 +01:00
Serial . println ( " Deleting: " + String ( index ) ) ;
2020-10-15 12:50:50 +02:00
for ( int i = index ; i < this - > maximumTextSets ; i + + )
{
2020-12-15 11:04:41 +01:00
if ( i < this - > maximumTextSets - 1 )
2020-10-15 22:54:20 +02:00
this - > text_sets . sets [ i ] = this - > text_sets . sets [ i + 1 ] ;
2020-10-15 12:50:50 +02:00
else
this - > text_sets . sets [ i ] = this - > defaultTextSet ;
}
2020-12-15 11:04:41 +01:00
}
2020-10-15 12:50:50 +02:00
else
strncpy ( currentTextSet - > text , value - > c_str ( ) , sizeof ( currentTextSet - > text ) ) ;
}
2020-10-14 23:54:54 +02:00
else
returnValue = String ( currentTextSet - > text ) ;
break ;
case ActiveParameter :
if ( set )
currentTextSet - > active = * value = = " true " ;
else
returnValue = currentTextSet - > active ? " true " : " false " ;
break ;
case RuntimeParameter :
if ( set )
2020-10-18 16:26:24 +02:00
currentTextSet - > runtime = value - > toInt ( ) * 1000 ;
2020-10-14 23:54:54 +02:00
else
2020-10-18 19:16:27 +02:00
returnValue = String ( ( int ) round ( currentTextSet - > runtime / 1000 ) ) ;
//Serial.printf("Runtime is: %d \n", currentTextSet->runtime);
2020-10-14 23:54:54 +02:00
break ;
case ColorParameter :
if ( set )
strncpy ( currentTextSet - > color , value - > c_str ( ) , sizeof ( currentTextSet - > color ) ) ;
else
returnValue = String ( currentTextSet - > color ) ;
break ;
case AlignmentParameter :
if ( set )
{
if ( value - > toInt ( ) < 0 | | value - > toInt ( ) > AlignRight )
return ValueOutOfRangeError ;
currentTextSet - > alignment = text_align_t ( value - > toInt ( ) ) ;
}
else
returnValue = String ( currentTextSet - > alignment ) ;
break ;
case ScrollParameter :
if ( set )
currentTextSet - > scroll = * value = = " true " ;
else
returnValue = currentTextSet - > scroll ? " true " : " false " ;
break ;
2020-10-18 15:44:18 +02:00
case ScrollDirectionParameter :
2020-10-18 16:26:24 +02:00
if ( set )
2020-10-18 15:44:18 +02:00
currentTextSet - > scrollDirection = value - > toInt ( ) ;
else
returnValue = currentTextSet - > scrollDirection ;
break ;
2020-10-14 23:54:54 +02:00
case ScrollSpeedParameter :
if ( set )
{
if ( value - > toInt ( ) < 0 | | value - > toInt ( ) > 10 )
return ValueOutOfRangeError ;
currentTextSet - > scrollSpeed = value - > toInt ( ) ;
}
else
returnValue = String ( currentTextSet - > scrollSpeed ) ;
break ;
case ScrollCountParameter :
if ( set )
{
if ( value - > toInt ( ) < 0 )
return ValueOutOfRangeError ;
currentTextSet - > scrollCount = value - > toInt ( ) ;
}
else
returnValue = String ( currentTextSet - > scrollCount ) ;
break ;
case IndexParameter :
if ( set )
return ParameterNotWritableError ;
else
returnValue = String ( index ) ;
break ;
default :
break ;
}
if ( set )
{
this - > storeTextSets ( ) ;
return Success ;
}
else
{
* value = returnValue ;
return Success ;
}
}
2020-10-15 22:54:20 +02:00
bool LedDisplayController : : storeTextSets ( )
2020-10-13 17:01:29 +02:00
{
2022-07-28 10:11:12 +02:00
Serial . println ( " Text Sets where modified ... " ) ;
this - > setsModiefiedLastTime_ms = millis ( ) ;
this - > setModifyingActive = true ;
2020-10-15 22:54:20 +02:00
return true ;
2020-10-13 17:01:29 +02:00
}
2020-10-14 23:54:54 +02:00
bool LedDisplayController : : loadTextSets ( )
2020-10-13 17:01:29 +02:00
{
sets_t buf = { } ;
2020-10-15 22:54:20 +02:00
Serial . println ( " Loading Text Sets... " ) ;
if ( this - > eepromUnit ! = nullptr )
{
// read conf from EEPROM
this - > eepromUnit - > read ( buf ) ;
}
Serial . println ( " Loaded text sets: valid: " + String ( buf . valid ) ) ;
2020-10-13 17:01:29 +02:00
if ( strcmp ( buf . valid , " OK " ) = = 0 )
{
2020-10-15 22:54:20 +02:00
memcpy ( & text_sets , & buf , sizeof ( sets_t ) ) ;
2020-10-18 15:10:20 +02:00
//Serial.printf("OK: '%s\n", text_sets.sets[0].text);
2020-10-15 22:54:20 +02:00
return true ;
2020-10-13 17:01:29 +02:00
}
else
{
2020-10-14 23:54:54 +02:00
// There was an error reading the sets -> rebuild with default values!
2020-10-13 17:01:29 +02:00
2020-10-14 23:54:54 +02:00
sets_t defaultTextSets ;
2020-10-13 17:01:29 +02:00
2020-10-15 00:02:48 +02:00
for ( int i = 0 ; i < this - > maximumTextSets ; i + + )
2020-10-13 17:01:29 +02:00
{
2020-10-15 12:50:50 +02:00
defaultTextSets . sets [ i ] = this - > defaultTextSet ;
2020-10-13 17:01:29 +02:00
}
2020-10-15 22:54:20 +02:00
memcpy ( & text_sets , & defaultTextSets , sizeof ( sets_t ) ) ;
2020-10-18 16:26:24 +02:00
text_sets . disp_brightness = 70 ;
text_sets . disp_automatic_brightness_adjustment = false ;
2020-10-15 22:54:20 +02:00
return this - > storeTextSets ( ) ;
2020-10-14 23:54:54 +02:00
}
2020-10-13 17:01:29 +02:00
}
2020-10-14 23:54:54 +02:00
// ----------
// - Extern -
// ----------
2020-10-13 17:01:29 +02:00
2020-10-18 16:26:24 +02:00
void updateDisplayGlobal ( void * object )
2020-10-13 17:01:29 +02:00
{
2020-10-14 23:54:54 +02:00
for ( ; ; )
{
2020-10-13 17:01:29 +02:00
esp_task_wdt_reset ( ) ;
delay ( 1 ) ;
2020-10-18 16:26:24 +02:00
( ( LedDisplayController * ) ( object ) ) - > loop ( ) ;
2020-10-13 17:01:29 +02:00
}
}