numat / alicat

Python driver and command line tool for Alicat mass flow controllers.
GNU General Public License v2.0
21 stars 27 forks source link

Close communications port upon context manager exit #67

Closed joshMaybell closed 12 months ago

joshMaybell commented 1 year ago

Close the FlowMeter comport when the context manager exits

alexrudd2 commented 1 year ago

Thanks for the pull request! Have you tried on actual hardware? I should be able to verify tomorrow or early next week.

joshMaybell commented 1 year ago

Thanks for the pull request! Have you tried on actual hardware? I should be able to verify tomorrow or early next week.

This is a change we made that we use for our hardware interface software that we use for flow meters, but I have never tried with a flow controller. Also, there are a few other customizations we have so this change has never been tested in isolation - definitely worth giving it a test yourself to verify!

alexrudd2 commented 12 months ago

OK, the test suite passed on real hardware. Thanks for the fix!

Is there anything else you'd like to merge upstream? If not I'll publish to PyPI.