Skip to content

implement ADSHardware.__del__ to clean up open WF_SDK references#3

Open
leigh-johnson wants to merge 2 commits intoberkeley-physics111a:mainfrom
leigh-johnson:issue-2-handle-cleanup
Open

implement ADSHardware.__del__ to clean up open WF_SDK references#3
leigh-johnson wants to merge 2 commits intoberkeley-physics111a:mainfrom
leigh-johnson:issue-2-handle-cleanup

Conversation

@leigh-johnson
Copy link
Contributor

@leigh-johnson leigh-johnson commented Aug 6, 2025

Closes #2.

I moved ADSHardware definitions into a module so I didn't have to patch this in two places. Let me know if there was a reason ADSHardware was duplicated and this needs to be reverted. Otherwise, squash + merge at will.

$ python lab_10_template.py                   
[ATTEMPT] Opening ADS device
[SUCCESS] Opened device Analog Discovery 2 handle=c_int(1) addr=4399172504
[ATTEMPT] Closing device Analog Discovery 2 handle=c_int(1) addr=4399172504
[SUCCESS] Closed device  handle=c_int(0) addr=4399172504

I also enabled more verbose traceback on SIGSEGV (seg fault) signals, for follow-up (if needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

segmentation fault in ADSHardware.startup()

1 participant