diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-12-22 14:45:20 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-12-22 14:45:20 (GMT) |
commit | 1718f3aedefdc706093b07ab4964aefcc77a0b93 (patch) | |
tree | d22d84627105b452acb4fbdf17ce6d69c01d2cc3 /plugins | |
parent | 9b939896282fa19403d8baa4f435cb4b3de3c67c (diff) |
added calibration for XO 1.75 resistance
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/audio_sensors/audio_sensors.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/audio_sensors/audio_sensors.py b/plugins/audio_sensors/audio_sensors.py index 6b32e41..e0d7c76 100644 --- a/plugins/audio_sensors/audio_sensors.py +++ b/plugins/audio_sensors/audio_sensors.py @@ -340,12 +340,14 @@ class Audio_sensors(Plugin): if self.hw == XO1: resistance = 2.718 ** ((float(_avg(buf)) * 0.000045788) + \ 8.0531) - else: + elif self.hw == XO15: avg_buf = float(_avg(buf)) if avg_buf > 0: resistance = (420000000 / avg_buf) - 13500 else: resistance = 420000000 + else: # XO 1.75 + return (46000000 / (30514 - avg_buffer)) - 1150 if channel == 0: self._parent.lc.update_label_value('resistance', resistance) else: |