Skip to content

Added Tri-Color SSD1681 Driver #45

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

Merged
merged 6 commits into from
Feb 23, 2021
Merged

Conversation

makermelissa
Copy link
Collaborator

This PR does several things:

  • Adds a copy the existing SSD1681 (monochrome) driver to SSD1681B
  • Updates the existing SSD1681 driver to work as a Tri-Color display driver
  • Updates the examples to use the new drivers
  • Updates most examples to have consistent sets of initializers

@makermelissa makermelissa requested a review from a team February 22, 2021 22:41
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Are there really two different chips? One for color and one for black and white? Why not add a class constructor kwarg for color mode instead?

I see you already added a displayio version here: https://github.com/adafruit/Adafruit_CircuitPython_SSD1681 Does it cover both cases?

Are there plans to deprecate this library in favor of the displayio versions?

Thanks for adding support for these new e-inks!

.pylintrc Outdated
@@ -56,7 +56,7 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,duplicate-code
Copy link
Member

Choose a reason for hiding this comment

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

Please don't change the .pylintrc. You can usually do disables where they apply. Changing this file makes it impossible to know that the settings are consistent across repos.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately even though code is rated 10.00/10.00, the duplicate-code check runs regardless of disables in files. So without modifying the .pylintrc file, it doesn't appear that it is possible to disable this check.

@ladyada
Copy link
Member

ladyada commented Feb 22, 2021

this is for support on raspberry pi specifically - since we have bonnet's that will use this chipset (all Eink displays went thru a revision, very annoying)

@makermelissa
Copy link
Collaborator Author

I talked to @ladyada and the decision was to remove the 1681b file. The duplicate-code check appears to be something that was enabled by default on a very recent version of pylint. For the pylinrc change, it basically compares all the files and sees that there are a lot of similarities and fixing it would require rewriting the entire library. I can look at modify each file to see if that fixes the huge pylint error.

Currently Blinka displayio does not support eInks, so this won't be deprecated until it does. :)

@kattni
Copy link
Contributor

kattni commented Feb 23, 2021

I will be looking into the Pylint update tomorrow. It is popping up across the board and causing issues.

@tannewt
Copy link
Member

tannewt commented Feb 23, 2021

Currently Blinka displayio does not support eInks, so this won't be deprecated until it does. :)

Any plans to add it? You'd only need the displayio.EPaperDisplay class right?

I will be looking into the Pylint update tomorrow. It is popping up across the board and causing issues.

Thanks! I imagine a disable at the top of the file should fix it. Overall, it does seem like a reasonable check to have enabled though.

@makermelissa
Copy link
Collaborator Author

Thanks! I imagine a disable at the top of the file should fix it. Overall, it does seem like a reasonable check to have enabled though.

Unfortunately, this is a repo-level check rather than a file-level check and thus a simple disable at the top of any or even all files doesn't seem make a difference.

@makermelissa makermelissa merged commit 6678052 into adafruit:master Feb 23, 2021
@makermelissa
Copy link
Collaborator Author

Any plans to add it? You'd only need the displayio.EPaperDisplay class right?

@tannewt, I just realized I never answered your question. Yes, here's the issue for it: adafruit/Adafruit_Blinka_Displayio#3

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 26, 2021
Updating https://github.com/adafruit/Adafruit_CircuitPython_DS18X20 to 1.3.4 from 1.3.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_DS18X20#21 from adafruit/dherrada-patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_EPD to 2.8.0 from 2.7.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_EPD#45 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_GPS to 3.7.0 from 3.6.8:
  > Merge pull request adafruit/Adafruit_CircuitPython_GPS#54 from lesamouraipourpre/parse-gsa-and-gsv

Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.10.6 from 3.10.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#90 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.11.0 from 2.10.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#57 from adamcandy/add-page-addressing-mode

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Button to 1.5.2 from 1.5.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Button#27 from FoamyGuy/resizeable_button

Updating https://github.com/adafruit/Adafruit_CircuitPython_Display_Text to 2.15.0 from 2.14.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Display_Text#111 from FoamyGuy/wrap_by_pixels

Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.5.3 from 2.5.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#75 from adafruit/REUSE
  > Hardcoded Black and REUSE versions
  > Added pre-commit-config file
  > Added pre-commit and SPDX copyright

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 5.0.3 from 5.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#65 from brentru/update-cpython-example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants