pimoroni / fanshim-python

Python library for the Fan SHIM for Raspberry Pi
https://shop.pimoroni.com/products/fan-shim
MIT License
295 stars 85 forks source link

LED always on after restart with --noled #49

Closed SuNNjek closed 4 years ago

SuNNjek commented 5 years ago

I have the automatic example running as a service that automatically starts with my Pi. Since I don't want the LED to light up, I passed the --noled option to deactivate it.

Now after every reboot the LED is burning bright white which is quite annoying. Restarting the service fixes the problem temporarily, but it always turns on again after the next reboot.

Gadgetoid commented 5 years ago

This is a tricky one, since --noled really means "don't touch the LED pins I might be using them for something else" and turning the LED off from whatever default state boot noise might have set it involves actively driving the LED.

We might need a --led-mode in addition to --noled which can be used to say "I want to drive the LED, but instead of making it colourful please turn it off."

SuNNjek commented 5 years ago

I had a look through the last commits and it looks like this was already implemented in 058ebc3?

Gadgetoid commented 5 years ago

That looks to be the case. Albeit it does cloud the meaning of “noled” a little, maybe I’ll wait and see if anyone complains!