javl / InstaxBLE

MIT License
54 stars 6 forks source link

Implemented threading #14

Closed sidharthb0 closed 6 months ago

sidharthb0 commented 8 months ago

The script has been modified to include a threading.Event object and to wait for this event before disconnecting, rather than using a sleep(60) call. This change should ensure that the script remains active until all operations have completed, without relying on an arbitrary timeout.

javl commented 8 months ago

This sounds great. Need to see when I can make some time for testing it though, but do remind me if I take too long!

Thanks!

javl commented 7 months ago

I really want to add this PR, but have some questions: Currently you import the threading module and create a done_event object, but this object is never used/checked, and the sleep(60) is also still in the code. Could you have forgotten to add some other changes to the PR?