LED matrix on/off added
This commit is contained in:
		
							parent
							
								
									a4419ab6f0
								
							
						
					
					
						commit
						381286331f
					
				@ -34,6 +34,12 @@ const FONT_CHAR_INFO *ActiveFontCharInfo = ActiveFontInfo->Descriptors;
 | 
			
		||||
void init_matrix_display(bool reverse) {
 | 
			
		||||
  ESP_LOGI(TAG, "Initializing LED Matrix display");
 | 
			
		||||
  matrix.begin(displaybuf, LED_MATRIX_WIDTH, LED_MATRIX_HEIGHT);
 | 
			
		||||
 | 
			
		||||
  if (MatrixDisplayIsOn)
 | 
			
		||||
    matrix.on();
 | 
			
		||||
  else
 | 
			
		||||
    matrix.off();
 | 
			
		||||
 | 
			
		||||
  if (reverse)
 | 
			
		||||
    matrix.reverse();
 | 
			
		||||
  matrix.clear();
 | 
			
		||||
@ -52,6 +58,10 @@ void refreshTheMatrixDisplay(bool nextPage) {
 | 
			
		||||
  // set display on/off according to current device configuration
 | 
			
		||||
  if (MatrixDisplayIsOn != cfg.screenon) {
 | 
			
		||||
    MatrixDisplayIsOn = cfg.screenon;
 | 
			
		||||
    if (MatrixDisplayIsOn)
 | 
			
		||||
      matrix.on();
 | 
			
		||||
    else
 | 
			
		||||
      matrix.off();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (nextPage) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user