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

add a command to output the full eeprom content

parent 7a39cd54
No related branches found
No related tags found
1 merge request!11add a command to output the full eeprom content
Pipeline #98097 passed
......@@ -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(f"{k:2}: {v}\n {v.hex()}")
if args.sdo:
await t.to_operational(4)
ret = await t.read_ODlist()
......
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