Skip to content

Commit

Permalink
🚀 5.1.1, #327
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail authored Nov 25, 2024
2 parents 9ddbdf6 + 072042f commit b99a310
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

## Version 5

### 5.1.1

- Fixed a bug on requesting the state of inactive relays during the UI update:
- OctoRelay v5 queried the GPIO pin state of inactive relays which could cause reservation conflicts and errors
such as `lgpio.error: 'GPIO busy'`;
- The issue was found and reported by [Christoph Hagen](https://github.com/christophhagen).

### 5.1.0

- Fixed compatibility issue with [Physical Button plugin](https://github.com/LuxuSam/PhysicalButton):
Expand Down
12 changes: 5 additions & 7 deletions octoprint_octorelay/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,13 @@ def update_ui(self):
))
for index in RELAY_INDEXES:
active = bool(settings[index]["active"])
relay = Driver.ensure(
int(settings[index]["relay_pin"] or 0),
bool(settings[index]["inverted_output"])
)
relay_state = relay.is_closed() if active else False
pin = int(settings[index]["relay_pin"] or 0)
inverted = bool(settings[index]["inverted_output"])
relay_state = Driver.ensure(pin, inverted).is_closed() if active else False
task = upcoming_tasks[index]
self.model[index] = {
"relay_pin": relay.pin,
"inverted_output": relay.inverted,
"relay_pin": pin,
"inverted_output": inverted,
"relay_state": relay_state, # bool since v3.1
"label_text": settings[index]["label_text"],
"active": active,
Expand Down

0 comments on commit b99a310

Please sign in to comment.