Skip to content

Commit 1458684

Browse files
committed
Fixed timeout = 0 problems
1 parent a6b4cfd commit 1458684

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Changelog
22

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

78
## v0.1.4

dbus-mqtt-grid/dbus-mqtt-grid.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def __init__(
382382
self._dbusservice.add_path("/ProductId", 0xFFFF)
383383
self._dbusservice.add_path("/ProductName", productname)
384384
self._dbusservice.add_path("/CustomName", customname)
385-
self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20231219)")
385+
self._dbusservice.add_path("/FirmwareVersion", "0.1.5 (20240702)")
386386
# self._dbusservice.add_path('/HardwareVersion', '')
387387
self._dbusservice.add_path("/Connected", 1)
388388

@@ -652,7 +652,7 @@ def main():
652652
)
653653

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

0 commit comments

Comments
 (0)