UMONS-GFA / ardas

FM Sensors conditionning based on on Arduino
GNU General Public License v3.0
0 stars 1 forks source link

Replace simple calibration file with a config.py file #69

Closed kaufmanno closed 6 years ago

kaufmanno commented 7 years ago

The config.py file should contain all data to configure the ardas and transform measured frequencies coming from the sensors in readable data.

kaufmanno commented 7 years ago

Should the config.py be different from the settings.py, or would it be better to merge them in a single file? @bastinc

kaufmanno commented 6 years ago

I changed the approach a little bit:

  1. I wrote sensor_tools.py to provide a FMSensor class and methods to process incoming frequencies (i.e. calibration using a polynomial expression, running average...). More methods could be added in the future to fit other use cases.
  2. This module should be imported in a python file (see Commodore64_sensorscilibration.py for an example) where objects corresponding to actual sensors are created from the `FMSensor' class and saved in files named sensor####.ssr where #### is the sensor identifier (usually an integer)
  3. A reference to these sensor_####.ssr files is added in the settings.py SENSORS = (st.load_sensor('0001'), st.load_sensor('0002'), st.load_sensor('0003'), st.load_sensor('0004'))