ESP32 Display Controller and Graphics Library

◆ setResolution()

void setResolution ( char const *  modeline,
int  viewPortWidth = -1,
int  viewPortHeight = -1,
bool  doubleBuffered = false 

Sets SSD1306 resolution and viewport size.

Viewport size can be larger than display size. You can pan the view using SSD1306Controller.setScreenCol() and SSD1306Controller.setScreenRow().

modelineNative display reoslution. Possible values: OLED_128x64 and OLED_128x32.
viewPortWidthVirtual viewport width. Should be larger or equal to display native width.
viewPortHeightVirtual viewport height. Should be larger or equal to display native height.
doubleBufferedif True allocates another viewport of the same size to use as back buffer.

Implements BaseDisplayController.

SSD1306_OLED/128x32/CollisionDetection/CollisionDetection.ino, SSD1306_OLED/128x32/SimpleTerminalOut/SimpleTerminalOut.ino, SSD1306_OLED/128x64/CollisionDetection/CollisionDetection.ino, SSD1306_OLED/128x64/DoubleBuffer/DoubleBuffer.ino, SSD1306_OLED/128x64/NetworkTerminal/NetworkTerminal.ino, SSD1306_OLED/128x64/RTClock/RTClock.ino, SSD1306_OLED/128x64/SimpleTerminalOut/SimpleTerminalOut.ino, and SSD1306_OLED/128x64/UI/UI.ino.

Definition at line 158 of file SSD1306Controller.cpp.