Skip to content

Commit 8d52f27

Browse files
committed
Remove dead code (GridConnectObserver is replaced by verbose=True in examples where PhysicalLayer subclass is avaiable).
1 parent 3f40bd9 commit 8d52f27

3 files changed

Lines changed: 0 additions & 8 deletions

File tree

examples/example_frame_interface.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# endregion same code as other examples
2020

2121
from openlcb import precise_sleep # noqa: E402
22-
from openlcb.canbus.gridconnectobserver import GridConnectObserver # noqa:E402
2322
from openlcb.tcplink.tcpsocket import TcpSocket # noqa: E402
2423
from openlcb.canbus.canphysicallayergridconnect import ( # noqa: E402
2524
CanPhysicalLayerGridConnect,
@@ -80,8 +79,6 @@ def handleDisconnect():
8079
physicalLayer.sendFrameAfter(frame)
8180
physicalLayer.sendAll(sock, verbose=True)
8281

83-
observer = GridConnectObserver()
84-
8582
# display response - should be RID from nodes
8683
while True:
8784
count = physicalLayer.receiveAll(sock, verbose=True)

examples/example_node_implementation.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
# endregion same code as other examples
2121

2222
from openlcb import precise_sleep # noqa: E402
23-
from openlcb.canbus.gridconnectobserver import GridConnectObserver # noqa:E402
2423
from openlcb.tcplink.tcpsocket import TcpSocket # noqa: E402
2524

2625
from openlcb.canbus.canphysicallayergridconnect import ( # noqa: E402
@@ -160,8 +159,6 @@ def displayOtherNodeIds(message) :
160159
NodeID(settings['localNodeID']), None)
161160
canLink.sendMessage(message)
162161

163-
observer = GridConnectObserver()
164-
165162
# process resulting activity
166163
while True:
167164
count = 0

examples/example_remote_nodes.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from timeit import default_timer
1515
from examples_settings import Settings # do 1st to fix path if no pip install
1616
from openlcb import precise_sleep
17-
from openlcb.canbus.gridconnectobserver import GridConnectObserver
1817
settings = Settings()
1918

2019
if __name__ == "__main__":
@@ -106,7 +105,6 @@ def printMessage(msg):
106105

107106
readQueue = Queue()
108107

109-
observer = GridConnectObserver()
110108
_frameReceivedListeners = physicalLayer._frameReceivedListeners
111109
assert len(_frameReceivedListeners) == 1, \
112110
"{} listener(s) unexpectedly".format(len(_frameReceivedListeners))

0 commit comments

Comments
 (0)