Skip to content

Fix: GPIO module#317

Open
RiSKeD wants to merge 3 commits into
mainfrom
fix/gpio-module
Open

Fix: GPIO module#317
RiSKeD wants to merge 3 commits into
mainfrom
fix/gpio-module

Conversation

@RiSKeD
Copy link
Copy Markdown
Contributor

@RiSKeD RiSKeD commented Apr 9, 2026

resolves #292

Copilot AI review requested due to automatic review settings April 9, 2026 09:16
@RiSKeD RiSKeD changed the title Fix/gpio module Fix: GPIO module Apr 9, 2026
@RiSKeD RiSKeD force-pushed the fix/gpio-module branch from efa6b65 to 15f108f Compare April 9, 2026 09:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.state to off when the configured initial state is not on.
  • 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.

Comment thread pkg/module/gpio/gpio.go Outdated
Comment thread pkg/module/gpio/gpio.go
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

@jenstopp jenstopp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍
Please name the GPIO module in all commit messages

RiSKeD added 3 commits May 13, 2026 15:43
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>
@RiSKeD RiSKeD force-pushed the fix/gpio-module branch 2 times, most recently from e7c730f to ed46d1f Compare May 13, 2026 13:43
@RiSKeD
Copy link
Copy Markdown
Contributor Author

RiSKeD commented May 13, 2026

👍 Please name the GPIO module in all commit messages

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GPIO-switch module output is missing state and is missing new line

3 participants