Update ESP32-HUB75-MatrixPanel-I2S-DMA.cpp
This commit is contained in:
parent
e6aa0cbd80
commit
9f82254f03
1 changed files with 7 additions and 5 deletions
|
@ -769,7 +769,8 @@ void MatrixPanel_I2S_DMA::hlineDMA(int16_t x_coord, int16_t y_coord, int16_t l,
|
||||||
if ( !initialized )
|
if ( !initialized )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord >= PIXELS_PER_ROW || y_coord >= m_cfg.mx_height)
|
// 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)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (x_coord+l > PIXELS_PER_ROW)
|
if (x_coord+l > PIXELS_PER_ROW)
|
||||||
|
@ -843,7 +844,8 @@ void MatrixPanel_I2S_DMA::vlineDMA(int16_t x_coord, int16_t y_coord, int16_t l,
|
||||||
if ( !initialized )
|
if ( !initialized )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( x_coord < 0 || y_coord < 0 || l < 1 || x_coord >= PIXELS_PER_ROW || y_coord >= m_cfg.mx_height)
|
// 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)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (y_coord + l > m_cfg.mx_height)
|
if (y_coord + l > m_cfg.mx_height)
|
||||||
|
|
Loading…
Reference in a new issue