ulfsri / pyAlicat

Python API for acquisition and control of Alicat mass flow meters and controllers.
https://ulfsri.github.io/pyAlicat/
MIT License
0 stars 1 forks source link

Make sure self._df_ret is defined before using or see alternatives #88

Open GraysonBellamy opened 6 months ago

GraysonBellamy commented 6 months ago

🚀 Feature Request

Any function using self._df_ret needs to make sure it's defined first. See first lines of poll() function where it checks for self._df_format.

🔈 Motivation

Those functions will error out if that variable isn't defined.

🛰 Alternatives

We may just want to call the get_format function at the setup of the device or make some seperate function to convert floats.

📎 Additional context

image

GraysonBellamy commented 6 months ago

Currently have "if df_format is None: get_df_format()" at the beginning of all relevant functions. Will continue looking into if it is possible to initialize with a dataframe format

GraysonBellamy commented 5 months ago

In the future want to put in init