pimoroni / clean-shutdown

Python daemon to watch a GPIO pin and trigger a clean shutdown.
MIT License
125 stars 40 forks source link

Various cleanup #15

Closed pstray closed 5 years ago

pstray commented 5 years ago

Various cleanups: Simpler, more robust reading of config file, including removal of all the "declare -i", some of which were just wrong. Some more descriptive names, and simpler logic. More quoteing of variables. Inline expressions. Added a (missing) sleep in the off-loop when led_pin is off.

Gadgetoid commented 5 years ago

Thanks for taking the time to make this PR! It hasn't gone unnoticed. I've just been busy with 101 other things. It's on my TODO list to test and merge.

pstray commented 5 years ago

Fixed... replaced the last commit with one with just spaces and no tabs :)

ferrix commented 5 years ago

Fixes #19

Gadgetoid commented 5 years ago

Thank you- this is brilliant work. I agree with @ferrix it's drastically cleaned up the code and made it easier to read. Much appreciated!