Skip to content

Commit 2854525

Browse files
expose line function
already exists in framebuf, can be used today by reaching through the oled object with `oled.framebuf.line(16,16,32,32, 1)` changed variable names to conform to conventions Removed trailing whitespace, and attempted to disable `too-many-arguments` linting
1 parent d6e50f4 commit 2854525

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

adafruit_ssd1306.py

+6
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@ def text(self, string, xpos, ypos, col=1):
130130
"""Place text on display"""
131131
self.framebuf.text(string, xpos, ypos, col)
132132

133+
#pylint: disable-msg=too-many-arguments
134+
def line(self, xpos0, ypos0, xpos1, ypos1, col=1):
135+
"""Draw a line from initial to final point"""
136+
self.framebuf.line(xpos0, ypos0, xpos1, ypos1, col)
137+
#pylint: disable-msg=too-many-arguments
138+
133139
class SSD1306_I2C(_SSD1306):
134140
"""
135141
I2C class for SSD1306

0 commit comments

Comments
 (0)