robweber / omni-epd

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

Clear() Method Fix #45

Closed robweber closed 3 years ago

robweber commented 3 years ago

Some devices require a color to be passed to the Clear() method in order for it to work. In the Waveshare examples this is typically white as that will make the screen appear "clear" for a two color display. This PR will add this additional parameter to devices that require it.

Changes

The WaveshareBWDisplay class now uses a dict instead of an array to hold settings for each device type. The settings related to the different init() and clear() arguments were getting to complicated to keep in separate arrays. The dict makes it more clear what method calls correspond to which device. This could probably be further abstracted into the parent class but that's not necessary for now.