diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2021-08-13 11:17:17 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2021-08-13 11:17:17 +0100 |
| commit | 971da05cac7fcb7ddd0555be672ed6754621efc3 (patch) | |
| tree | 1a2fe26fc603529442981ef55840181f78831611 | |
| parent | 037e7d6da3b334fc47a8d4995fa0fe408da35712 (diff) | |
Revert "Update ESP32-HUB75-MatrixPanel-I2S-DMA.cpp"
This reverts commit 9f82254f039888dd23b20c9e5d162e316f248263.
| -rw-r--r-- | ESP32-HUB75-MatrixPanel-I2S-DMA.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp index f740962..0347ad7 100644 --- a/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp +++ b/ESP32-HUB75-MatrixPanel-I2S-DMA.cpp @@ -768,9 +768,8 @@ uint8_t MatrixPanel_I2S_DMA::setLatBlanking(uint8_t pulses){ void MatrixPanel_I2S_DMA::hlineDMA(int16_t x_coord, int16_t y_coord, int16_t l, uint8_t red, uint8_t green, uint8_t blue){ if ( !initialized ) return; - - // AdaFruit_GFX x and y co-ords start at 0 and go to width-1 or height-1 (i.e. 0-63, 0-31 for a 64x32 panel) - if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord > PIXELS_PER_ROW || y_coord > m_cfg.mx_height) + + if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord >= PIXELS_PER_ROW || y_coord >= m_cfg.mx_height) return; if (x_coord+l > PIXELS_PER_ROW) @@ -843,9 +842,8 @@ void MatrixPanel_I2S_DMA::hlineDMA(int16_t x_coord, int16_t y_coord, int16_t l, void MatrixPanel_I2S_DMA::vlineDMA(int16_t x_coord, int16_t y_coord, int16_t l, uint8_t red, uint8_t green, uint8_t blue){ if ( !initialized ) return; - - // AdaFruit_GFX x and y co-ords start at 0 and go to width-1 or height-1 (i.e. 0-63, 0-31 for a 64x32 panel) - if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord > PIXELS_PER_ROW || y_coord > m_cfg.mx_height) + + if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord >= PIXELS_PER_ROW || y_coord >= m_cfg.mx_height) return; if (y_coord + l > m_cfg.mx_height) @@ -932,4 +930,4 @@ void MatrixPanel_I2S_DMA::fillRectDMA(int16_t x, int16_t y, int16_t w, int16_t h } } -#endif // NO_FAST_FUNCTIONS +#endif // NO_FAST_FUNCTIONS
\ No newline at end of file |
