-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Human-readable list of supported devices #133
Comments
I seem to think we (mis)used Python's What do mean by proper names? |
@rm-hull the names in the project description is what I'm trying to get into the documentation
|
Specifically, I want to get rid of the hard-coded devices here: |
Similar to the approach in luma.oled: https://github.com/rm-hull/luma.oled/blob/3.1.0/doc/conf.py#L69 |
I suggest something like __all__ = ["max7219", "ws2812", "neopixel", "neosegment", "apa102"]
__deviceNames__ = {
"max7219": "MAX7219",
"ws2812": "WS2812",
"neopixel": "Neopixel",
"neosegment": "Neosegment",
"apa102": "APA102"
} And then some method that retrieves the device name by classname etc. Or we could add a class max7219(device):
"""
Serial interface to a series of 8x8 LED matrixes daisychained together with
MAX7219 chips.
On creation, an initialization sequence is pumped to the display to properly
configure it. Further control commands can then be called to affect the
brightness and other settings.
"""
label = 'MAX7219' Note that whatever approach has to work for all other libraries as well. Thoughts @rm-hull? |
How about
? |
That's fine with me as well. I'll make a PR. |
Actually, I'd rather not mess around with |
Ok, no problem. Don’t mind which approach tbh ... maybe go with
to keep them located together |
device.py contains:
but this cannot be used in the documentation project headline for example. Having a method that returns proper names of these devices instead would be useful.
The text was updated successfully, but these errors were encountered: