lewisxhe / esp32-camera-series

🔰 Compatible with all TTGO camera products
MIT License
183 stars 139 forks source link

Screen rotation with camera #7

Open alejandro-anv opened 5 years ago

alejandro-anv commented 5 years ago

I sugest a modification:

After oled.init, add:

ifdef ENABLE_SSD1306

oled.init();
**oled.flipScreenVertically();**

This will leave the screen with the same orientation of the camera.

And when flipping the camera: en = en ? 0 : 1; s->set_vflip(s, en);

ifdef ENABLE_SSD1306

**if (en)
   oled.resetOrientation();
else
   oled.flipScreenVertically();
oled.display();**
#endif