robweber / omni-epd

An EPD (electronic paper display) class abstraction to simplify communications across multiple display types.
GNU General Public License v3.0
77 stars 16 forks source link

Waveshare Fixes #8

Closed robweber closed 3 years ago

robweber commented 3 years ago

This is an attempt to work around the inconsistances in the waveshare EPD class libraries by defining some ways of handling major differences. The main types are listed below:

Waveshare General

These are all the main b/w EPD devices that share a common naming in their methods. The only big difference is that a few classes require an arg to their init() method. These are handled by identifying at the time of loading. At this point all are set to Full refresh.

Waveshare Tri Color

These are all the devices that, due to multi color options, require 2 Image objects to be passed to the display() function. The solution to these, for now, is to simply pass the b/w image and a blank image for the second type. This could be extended in the future to allow 2 color images.

Waveshare 1.02 in Display

This one is kind of an oddity in that it's method calls are all different than any other display. Easier to just make it's own class to handle.

Waveshare 3.7in Display

This device has some different method calls as well due to the fact it can do b/w or 4 tone grayscale. For now just the b/w call is supported but could be extended for the full 4 tone grayscale option in the future.