Skip to content

expose line function #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions adafruit_ssd1306.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def text(self, string, xpos, ypos, col=1):
"""Place text on display"""
self.framebuf.text(string, xpos, ypos, col)

#pylint: disable-msg=too-many-arguments
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you only need this disable once if you put it in the method after the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops I meant to re-enable it after this block, I saw some other hunk of code that did that. Copy/pasted a bit too much, fixing...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolved via 4bc78f8

def line(self, xpos0, ypos0, xpos1, ypos1, col=1):
"""Draw a line from initial to final point"""
self.framebuf.line(xpos0, ypos0, xpos1, ypos1, col)
#pylint: disable-msg=too-many-arguments

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be much more efficient to just add self.line = self.framebuf.line to __init__ — and same for all of the other functions.

class SSD1306_I2C(_SSD1306):
"""
I2C class for SSD1306
Expand Down