Skip to content
Snippets Groups Projects
Commit 0016a8ae authored by Martin Teichmann's avatar Martin Teichmann Committed by Martin Teichmann
Browse files

actually pre-operational is good enough

for most operations, pre-operational is good enough a state.
By thinko we went to safe operational, which is not needed.
parent 6f28a8a4
No related branches found
No related tags found
1 merge request!12support Inficon gauges
......@@ -220,9 +220,8 @@ class EBPFTerminal(Terminal):
if (self.compatibility is not None and
(self.vendorId, self.productCode) not in self.compatibility):
raise RuntimeError(
f"Incompatible Terminal: {self.vendorId}:{self.productCode} "
f"({relative}, {absolute})")
await self.to_operational(4)
f"Incompatible Terminal: {self.vendorId}:{self.productCode}")
await self.to_operational(2)
self.pdos = {}
if self.has_mailbox():
await self.parse_pdos()
......
......@@ -557,7 +557,7 @@ class Terminal:
0x0130, "H2xH")
if error != 0:
raise EtherCatError(f"AL register {error}")
if state == target:
if state >= target:
return
async def get_error(self):
......
......@@ -74,7 +74,7 @@ async def info():
print(f"{k:2}: {v}\n {v.hex()}")
if args.sdo:
await t.to_operational(4)
await t.to_operational(2)
ret = await t.read_ODlist()
for k, v in ret.items():
print(f"{k:X}:")
......@@ -91,7 +91,7 @@ async def info():
else:
print(f" {r}")
if args.pdo:
await t.to_operational(4)
await t.to_operational(2)
await t.parse_pdos()
for (idx, subidx), (sm, pos, fmt) in t.pdos.items():
print(f"{idx:4X}:{subidx:02X} {sm} {pos} {fmt}")
......@@ -164,7 +164,7 @@ async def create_test():
await t.initialize(-i, await ec.find_free_address())
sdo = {}
if t.has_mailbox():
await t.to_operational(4)
await t.to_operational(2)
odlist = await t.read_ODlist()
for k, v in odlist.items():
......
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