Skip to content

Commit

Permalink
implement adapter parent in Node
Browse files Browse the repository at this point in the history
  • Loading branch information
sjev committed Jun 20, 2024
1 parent cadf6e8 commit 48c5016
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Empty file modified examples/node_system.py
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/roxbot/adapters/mqtt_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MqttAdapter:
"""MQTT bridge for communication between subsystems"""

def __init__(
self, config: MqttConfig | None = None, parent: Any | None = None
self, parent: Any | None = None, config: MqttConfig | None = None
) -> None:

self._parent = parent
Expand Down
2 changes: 1 addition & 1 deletion src/roxbot/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Node:
def __init__(self, name: str | None = None) -> None:
self.name = name or self.__class__.__name__
self._log = logging.getLogger(self.name)
self.mqtt = MqttAdapter()
self.mqtt = MqttAdapter(self)

# error and warning counters. Will be sent with heartbeat.
# increment on exceptions or warnings.
Expand Down

0 comments on commit 48c5016

Please sign in to comment.