lexus2k / lcdgfx

Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms
MIT License
357 stars 51 forks source link

Example lode_runner_ili9341.ini don't compile, missing method setRotation #30

Closed lcgamboa closed 3 years ago

lcgamboa commented 3 years ago

Using Arduino 1.8.13 IDE the example lode_runner_ili9341.ini don't compile when line 286 is uncommented to enable display rotation. https://github.com/lexus2k/lcdgfx/blob/ef1a62fd4c86a7f5421c37065b6528634573f677/examples/games/lode_runner_ili9341/lode_runner_ili9341.ino#L286

Error:

/tmp/arduino_modified_sketch_394812/lode_runner_ili9341.ino: In function 'void setup()':
lode_runner_ili9341:286:13: error: 'GraphicsDisplay {aka class DisplayILI9341_240x320x16_SPI}' has no member named 'setRotation'
     display.setRotation(1);
             ^~~~~~~~~~~
exit status 1
'GraphicsDisplay {aka class DisplayILI9341_240x320x16_SPI}' has no member named 'setRotation'

Using:

lexus2k commented 3 years ago

Thank you for reporting the issue. Try this line instead:

    display.getInterface().setRotation(1);
lcgamboa commented 3 years ago

Thank you, problem solved.