adafruit / Adafruit_CircuitPython_SSD1680

CircuitPython `displayio` driver for SSD1680-based ePaper displays
MIT License
7 stars 7 forks source link

Update ssd1680_simpletest.py #9

Closed dave-ct closed 1 year ago

dave-ct commented 1 year ago

Added comment on how to change display height for Monochrome version to work correctly

dave-ct commented 1 year ago

Want to add a separate example for the monochrome display?

@tannewt Will have a go at the weekend and update this pull request.

tannewt commented 1 year ago

Thank you!

makermelissa commented 1 year ago

Want to add a separate example for the monochrome display?

@tannewt Will have a go at the weekend and update this pull request.

I think maybe adjusting the offset by adding a rowstart=5 parameter (possibly it may be colstart instead) to the init code would be the appropriate fix rather than adjusting the height which brings its own set of issues.

jposada202020 commented 1 year ago

probably would be a good idea to verify #5 at the same time. sadly, I do not have the hardware to make the tests.

dave-ct commented 1 year ago

@makermelissa @jposada202020 @tannewt Have made an update to the ssd1680 and simpletest example that works now on both mono and tri colour featherwings. As cannot test on other devices have made clostart default to 1 unless set otherwise so ssd1680 will still work previous simpletest versions.

dave-ct commented 1 year ago

Not sure why the Formatting checks have failed?

jposada202020 commented 1 year ago

dave-ct is because of the formating.

Error: reformatted adafruit_ssd1680.py from (https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/actions/runs/4187808124/jobs/7258138283)

this is easily fixed using pre-commit run --all-files you could find more info here...

https://learn.adafruit.com/improve-your-code-with-pylint/check-your-code-with-pre-commit

Let me know if you need more help :)

dave-ct commented 1 year ago

@jposada202020 that did the job, checks all passed now. Thanks for the pointer.

jposada202020 commented 1 year ago

@dave-ct I will take a look over the weekend, hopefully, thanks again :)

makermelissa commented 1 year ago

Hi, for the driver, because of the **kwargs in the init function, you should be able to just remove the colstart=1, and just add colstart to the init code in the example and it will automatically pass through. This avoids introducing a new parameter.

Since the code is likely already in use, you should also check if it was in kwargs and default to 1 if not. This way we can have the intended functionality without breaking anything.

dave-ct commented 1 year ago

@makermelissa much cleaner way than what I did. Tested fine on my devices.

tannewt commented 1 year ago

If different devices need a different colstart setting, then it'd be ideal to have separate examples for them. That's easier than reading comments and changing code.

makermelissa commented 1 year ago

Oops, yeah. I guess I merged too soon.