fix Adafruit_GFX override setRotation

The Adafruit_GFX uses setRotation(uint8_t), while the virtual matrix display uses setRotation(int). Therefore there is no implicit override and if you call the function either with an uint8_t or from an Adafruit_GFX* the overloaded funtion is not called
This commit is contained in:
Lukaswnd 2023-12-16 23:25:31 +01:00 committed by GitHub
parent e1025d0df2
commit 3f0fdc72bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,7 @@ public:
// equivalent methods of the matrix library so it can be just swapped out.
void drawPixel(int16_t x, int16_t y, uint16_t color); // overwrite adafruit implementation
void fillScreen(uint16_t color); // overwrite adafruit implementation
void setRotation(int rotate); // overwrite adafruit implementation
void setRotation(uint8_t rotate); // overwrite adafruit implementation
void fillScreenRGB888(uint8_t r, uint8_t g, uint8_t b);
void clearScreen() { display->clearScreen(); }
@ -472,7 +472,7 @@ inline void VirtualMatrixPanel::fillScreen(CRGB color)
}
#endif
inline void VirtualMatrixPanel::setRotation(int rotate)
inline void VirtualMatrixPanel::setRotation(uint8_t rotate)
{
if(rotate < 4 && rotate >= 0)
_rotate = rotate;