Fix: GPIO module#317
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the gpio-switch module so it reports a valid initial state immediately after startup (matching documented behavior) and ensures the “current state” output is newline-terminated.
Changes:
- Initialize
Switch.statetooffwhen the configured initial state is noton. - Add a trailing newline to the “Current state” output when
Run()is called with no arguments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jenstopp
left a comment
There was a problem hiding this comment.
👍
Please name the GPIO module in all commit messages
e7c730f to
ed46d1f
Compare
done |
s.state was never set when the initial value is "off" (the default), leaving it as an empty string. Querying state before the first on/off command printed "Current state: " with no value. Signed-off-by: Fabian Wienand <fabian.wienand@blindspot.software>
Signed-off-by: Fabian Wienand <fabian.wienand@blindspot.software>
Signed-off-by: Fabian Wienand <fabian.wienand@blindspot.software>
resolves #292