Skip to content

Commit 3d3d44b

Browse files
committed
Add 64x32 OLEDs (SH1107)
1 parent cdc6588 commit 3d3d44b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/i2c/WipperSnapper_I2C.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,10 @@ bool WipperSnapper_Component_I2C::initI2CDevice(
902902
WS_DEBUG_PRINTLN("SH1107 display configured successfully!");
903903
_drivers_out.push_back(_sh1107);
904904
WS_DEBUG_PRINTLN("SH1107 display initialized Successfully!");
905-
} else if (strcmp("oled128x32wingdefault",
905+
} else if (strcmp("oled64x32default", msgDeviceInitReq->i2c_device_name) ==
906+
0 ||
907+
strcmp("oled64x32large", msgDeviceInitReq->i2c_device_name) == 0 ||
908+
strcmp("oled128x32wingdefault",
906909
msgDeviceInitReq->i2c_device_name) == 0 ||
907910
strcmp("oled128x32winglarge", msgDeviceInitReq->i2c_device_name) ==
908911
0 ||

src/components/i2c/drivers/WipperSnapper_I2C_Driver_Out_Sh1107.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,11 @@ class WipperSnapper_I2C_Driver_Out_SH1107
127127
@param text_size
128128
The magnification factor for the text size.
129129
*/
130-
void ConfigureSSD1306(uint8_t width, uint8_t height,
131-
uint8_t text_size) {
130+
void ConfigureSSD1306(uint8_t width, uint8_t height, uint8_t text_size) {
132131
// This is a SH1107, not a SSD1306, so we don't need to do anything here.
133132
ConfigureSH1107(width, height, text_size);
134133
}
135134

136-
137135
/*!
138136
@brief Writes a message to the SH1107 display.
139137
@param message
@@ -189,11 +187,10 @@ class WipperSnapper_I2C_Driver_Out_SH1107
189187
}
190188
}
191189

192-
193190
/*!
194191
@brief Writes a message to the fake "SSD1306" SH1107 display.
195-
@param msg_write
196-
Pointer to a wippersnapper_i2c_v1_SSD1306Write message.
192+
@param message
193+
The message to be displayed.
197194
*/
198195
void WriteMessageSSD1306(const char *message) {
199196
// This is a SH1107, not a SSD1306, so we just call the SH1107 write

0 commit comments

Comments
 (0)