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

add options to show the eeprom

parent ed99ae3a
No related branches found
No related tags found
No related merge requests found
Pipeline #116947 failed
......@@ -37,6 +37,7 @@ async def info():
parser.add_argument("-s", "--sdo", action="store_true")
parser.add_argument("-v", "--values", action="store_true")
parser.add_argument("-p", "--pdo", action="store_true")
parser.add_argument("-e", "--eeprom", action="store_true")
args = parser.parse_args()
ec = EtherCat(args.interface)
......@@ -68,6 +69,10 @@ async def info():
print(infos[i+1 : i+infos[i]+1].decode("ascii"))
i += infos[i] + 1
if args.eeprom:
for k, v in t.eeprom.items():
print(k, v, v.hex(" "))
if args.sdo:
await t.to_operational(2)
ret = await t.read_ODlist()
......@@ -85,6 +90,7 @@ async def info():
print(f" {r:10} {r:8X}")
else:
print(f" {r}")
print(f" {r!r}")
if args.pdo:
await t.to_operational(2)
await t.parse_pdos()
......
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