kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
897 stars 124 forks source link

import uhej only when scanning #162

Closed danielkucera closed 5 years ago

danielkucera commented 5 years ago

Don't require uhej for normal operation, only when scan is invoked.

kanflo commented 5 years ago

It seems neither of us tried this scanning with the PR ;)

This causes an assert in uhej_scan which surprises me:

from uhej import uhej
uhej_scan()

Moving the import to uhej_scan() will still throw an assert in uhej_worker_thread.

danielkucera commented 5 years ago

I'm sorry, I've had nowhere to test... Did you try to import also in the thread?

kanflo commented 5 years ago

No worries, blame is all on me. Quite baffling though that the import did not follow into the function call.