Skip to content

Commit

Permalink
Fixed timeout = 0 problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-manuel committed Jul 2, 2024
1 parent a6b4cfd commit 1458684
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Changelog

## v0.1.5 (not releaded yet)
## v0.1.5
* Added: Error handling
* Changed: Fixed problems when timeout was set to `0`.
* Changed: Handling when voltage=0 is provided and no current

## v0.1.4
Expand Down
4 changes: 2 additions & 2 deletions dbus-mqtt-grid/dbus-mqtt-grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def __init__(
self._dbusservice.add_path("/ProductId", 0xFFFF)
self._dbusservice.add_path("/ProductName", productname)
self._dbusservice.add_path("/CustomName", customname)
self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20231219)")
self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20240702)")
# self._dbusservice.add_path('/HardwareVersion', '')
self._dbusservice.add_path("/Connected", 1)

Expand Down Expand Up @@ -652,7 +652,7 @@ def main():
)

# check if timeout was exceeded
if timeout <= (i * 5):
if timeout != 0 and timeout <= (i * 5):
logging.error(
"Driver stopped. Timeout of %i seconds exceeded, since no new MQTT message was received in this time."
% timeout
Expand Down

0 comments on commit 1458684

Please sign in to comment.