robweber / omni-epd

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

Black vs BW #61

Closed robweber closed 2 years ago

robweber commented 2 years ago

I noticed when looking through things that some devices use bw as they default mode identifier while others use black. It's more of a semantic difference but sticking with a single identifier across all types would be more consistent. There are also areas in the parent virtualepd.py class where it checks specifically for bw as a string before applying certain functions.

Might be worth the effort of defining some constants for comparisons as well as consistency.

donbing commented 2 years ago

if someone is using mode=black in their config, would this be a breaking change?

I agree that it'd be very nice to fix it.

robweber commented 2 years ago

@missionfloyd - thanks for the PR.

I added a quick check in the parent VirtualEPD class to check if black is given as a mode. If it is a warning will be shown and it will be set to bw. This will give anyone a heads up and time to correct their config files.