saleae / logic2-automation

Logic2 Automation API
https://saleae.github.io/logic2-automation/
Apache License 2.0
19 stars 8 forks source link

[Request] Provides an interface to get the ID of the connected device #18

Closed RedChinese closed 1 year ago

RedChinese commented 1 year ago

Currently, the device ID needs to be manually copied into the code. Can you provide an interface for obtaining the ID of the connected device

timreyes commented 1 year ago

@RedChinese This is possible now via the get_devices() command linked below. https://saleae.github.io/logic2-automation/automation.html#saleae.automation.Manager.get_devices

I hope this was what you were looking for!

timreyes commented 1 year ago

Additionally, I wanted to let you know that you can omit the device_id argument. In this case, Logic 2 will choose the first real (non-simulated) device.

RedChinese commented 1 year ago

Thank you very much for your guidance