Skip to content

Fix: GPIO module#317

Merged
RiSKeD merged 3 commits into
mainfrom
fix/gpio-module
May 18, 2026
Merged

Fix: GPIO module#317
RiSKeD merged 3 commits into
mainfrom
fix/gpio-module

Conversation

@RiSKeD

@RiSKeD RiSKeD commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown

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

Copilot AI left a comment

Copy link
Copy Markdown

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.

Copilot AI left a comment

Copy link
Copy Markdown

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.

@jenstopp jenstopp left a comment

Copy link
Copy Markdown
Member

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 RiSKeD force-pushed the fix/gpio-module branch 2 times, most recently from e7c730f to ed46d1f Compare May 13, 2026 13:43
@RiSKeD

RiSKeD commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

👍 Please name the GPIO module in all commit messages

done

RiSKeD added 3 commits May 18, 2026 08:20
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 from ed46d1f to c04a442 Compare May 18, 2026 06:20
@RiSKeD RiSKeD merged commit 437fe4e into main May 18, 2026
12 checks passed
@RiSKeD RiSKeD deleted the fix/gpio-module branch May 18, 2026 06:22
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