Skip to content
Snippets Groups Projects
Commit 19c3f7a4 authored by Martin Teichmann's avatar Martin Teichmann
Browse files

fix counting terminals

there should be a test for this.
parent d9d337ed
No related branches found
No related tags found
No related merge requests found
......@@ -375,7 +375,7 @@ class EtherCat(Protocol):
p = Packet()
p.append(ECCmd.APRD, b"\0\0", 0, 0, 0x10)
ret = await self.roundtrip_packet(p)
no, = unpack("<h", ret[16:18]) # number of terminals
no, = unpack_from("<h", ret, 18) # number of terminals
return no
async def find_free_address(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment