Open xaver-k opened 3 years ago
RE: Refactoring, could you provide more detail in a separate ticket? Code definitely needs some general refactoring(format, make more use of constants, simplification, etc..) but not sure where your going with splitting things.
What does this PR do and why is it necessary?
The changes allow to re-use the switching GPIO for sensing the current on/off state. This addresses #182.
How was it tested? How can it be tested by the reviewer?
Tested on my personal setup, which uses a Raspberry 4 and pulls GPIO 2 to GND for switching the printer on:
Further testing on other setups is needed, but I only have the one printer.
What are the relevant tickets if any?
182
Further notes
CdevGPIO
now).inverted
-parameter ofCdevGPIO
to remove a lot of manual handling of inverted pin logic.