Merge pull request #234 from solhuebner/patch-1

VirtualMatrixPanel NO_GFX fix
This commit is contained in:
mrfaptastic 2022-01-09 17:04:02 +00:00 committed by GitHub
commit 185cb22893
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,7 +133,7 @@ inline VirtualCoords VirtualMatrixPanel::getCoords(int16_t &x, int16_t &y) {
//Serial.println("Called Base."); //Serial.println("Called Base.");
coords.x = coords.y = -1; // By defalt use an invalid co-ordinates that will be rejected by updateMatrixDMABuffer coords.x = coords.y = -1; // By defalt use an invalid co-ordinates that will be rejected by updateMatrixDMABuffer
if ( x < 0 || x >= width() || y < 0 || y >= height() ) { // Co-ordinates go from 0 to X-1 remember! width() and height() are out of range! if ( x < 0 || x >= virtualResX || y < 0 || y >= virtualResY ) { // Co-ordinates go from 0 to X-1 remember! otherwise they are out of range!
//Serial.printf("VirtualMatrixPanel::getCoords(): Invalid virtual display coordinate. x,y: %d, %d\r\n", x, y); //Serial.printf("VirtualMatrixPanel::getCoords(): Invalid virtual display coordinate. x,y: %d, %d\r\n", x, y);
return coords; return coords;
} }
@ -247,8 +247,10 @@ inline void VirtualMatrixPanel::drawPixelRGB888(int16_t x, int16_t y, uint8_t r,
inline void VirtualMatrixPanel::setRotate(bool rotate) { inline void VirtualMatrixPanel::setRotate(bool rotate) {
_rotate=rotate; _rotate=rotate;
#ifndef NO_GFX
// We don't support rotation by degrees. // We don't support rotation by degrees.
if (rotate) { setRotation(1); } else { setRotation(0); } if (rotate) { setRotation(1); } else { setRotation(0); }
#endif
} }
inline void VirtualMatrixPanel::setPhysicalPanelScanRate(PANEL_SCAN_RATE rate) { inline void VirtualMatrixPanel::setPhysicalPanelScanRate(PANEL_SCAN_RATE rate) {