mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
Reset before initialisation of the SSD1306 when OLED reset pin is set
If an OLED Reset pin has been selected using the PIN configuration, it makes sense to also send a reset signal to this pin before initialization of the display. The current value 0 doesn't send this signal, not even when a reset pin has been selected. Hence the change of value 0 into reset_pin >= 0. If no reset pin was set, the value of this variable is -1.
This commit is contained in:
parent
894950ca4e
commit
d15969bd1e
@ -83,7 +83,7 @@ void SSD1306InitDriver(void)
|
||||
// init renderer
|
||||
// oled1306 = new Adafruit_SSD1306(SSD1306_LCDWIDTH,SSD1306_LCDHEIGHT);
|
||||
oled1306 = new Adafruit_SSD1306(Settings.display_width, Settings.display_height, &Wire, reset_pin);
|
||||
oled1306->begin(SSD1306_SWITCHCAPVCC, Settings.display_address[0], 0);
|
||||
oled1306->begin(SSD1306_SWITCHCAPVCC, Settings.display_address[0], reset_pin >= 0);
|
||||
renderer = oled1306;
|
||||
renderer->DisplayInit(DISPLAY_INIT_MODE, Settings.display_size, Settings.display_rotate, Settings.display_font);
|
||||
renderer->setTextColor(1,0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user