pappersverk / inky

A library for managing Inky e-ink displays from Elixir.
Apache License 2.0
72 stars 11 forks source link

Add a convenient way to get display info by type #22

Open lawik opened 5 years ago

lawik commented 5 years ago

On the calling side it is usually useful to have access to whatever size the display is. In the Scenic driver I'm already expected to provide that information so it ends up a bit redundant. But it seems like if you pass :phat to the start_link if you could get {:ok, pid, display} it would help.

What do you think?

lawik commented 5 years ago

Add Inky.Display.get_size(type) as the public API to get display info.

nyaray commented 5 years ago

Changing start_link this way would make it behave in a non-standard way, which could lead to confusion. I can see the value of being able to query an Inky process to see what type of display it's been set to run for, though, and having Inky.Display expose functionality to inspect the type once it's up and running... So I guess I'm just :heavy_plus_sign: your comment, hehe :)