From 1d8969f645361e60c5ef250358be6ee7b1edadb3 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Sun, 18 Aug 2019 16:58:29 +0200 Subject: [PATCH] ledmatrixdisplay.cpp code sanitizations --- src/ledmatrixdisplay.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ledmatrixdisplay.cpp b/src/ledmatrixdisplay.cpp index 6c22fd23..a92f4cf9 100644 --- a/src/ledmatrixdisplay.cpp +++ b/src/ledmatrixdisplay.cpp @@ -10,14 +10,11 @@ // local Tag for logging static const char TAG[] = __FILE__; -uint8_t MatrixDisplayIsOn = 0; +static const uint32_t DisplaySize = LED_MATRIX_WIDTH * LED_MATRIX_HEIGHT / 8; +uint8_t MatrixDisplayIsOn = 0, displaybuf[DisplaySize] = {0}; static unsigned long ulLastNumMacs = 0; static time_t ulLastTime = myTZ.toLocal(now()); -// Display Buffer 128 = 64 * 16 / 8 -static const uint32_t DisplaySize = LED_MATRIX_WIDTH * LED_MATRIX_HEIGHT / 8; -uint8_t displaybuf[DisplaySize] = {0}; - LEDMatrix matrix(LED_MATRIX_LA_74138, LED_MATRIX_LB_74138, LED_MATRIX_LC_74138, LED_MATRIX_LD_74138, LED_MATRIX_EN_74138, LED_MATRIX_DATA_R1, LED_MATRIX_LATCHPIN, LED_MATRIX_CLOCKPIN); @@ -214,4 +211,5 @@ void ShiftLeft(uint8_t *arr, uint32_t len) { } arr[len - 1] = arr[len - 1] << 1; } + #endif // HAS_MATRIX_DISPLAY \ No newline at end of file