adafruit / Adafruit_CircuitPython_EMC2101

CircuitPython driver for EMC2101 brushless fan controller
MIT License
3 stars 9 forks source link

Add clear lut #10

Closed rpavlik closed 3 years ago

rpavlik commented 3 years ago

I separated this out because it adds a new API: a method "clear" to the driver as well as the lut itself. You could replace a value before, and you could add new values (and in #6 I added the ability to remove a value by assigning None), but you couldn't remove/clear values.

If you think this is useful, merge it, otherwise please feel free to close it. It's less urgent now that I realized I could add a way to remove a single value by assigning = None.

builds on #7 (which builds on #6 and #9 )

caternuson commented 3 years ago

It's less urgent now that I realized I could add a way to remove a single value by assigning = None.

That's probably the more Pythonic way to do this. Can you get everything done by just assigning None? Or can you think of another use case where a separate clear() methods is useful?

rpavlik commented 3 years ago

As long asyou can find out what values you set, the assigning none works, and I think you can find out the values you set.