From: Phil Howard Date: Mon, 16 Mar 2020 11:37:40 +0000 (+0000) Subject: Fix noise_floor bug X-Git-Url: https://zdv2.bktei.com/gitweb/EVA-2020-02-2.git/commitdiff_plain/97ee1d88e84df79d82c3ca20eb89378c65197f9a?hp=--cc Fix noise_floor bug --- 97ee1d88e84df79d82c3ca20eb89378c65197f9a diff --git a/library/CHANGELOG.txt b/library/CHANGELOG.txt index 65825f2..81d4136 100644 --- a/library/CHANGELOG.txt +++ b/library/CHANGELOG.txt @@ -1,3 +1,8 @@ +0.0.3 +----- + +* Fix "self.noise_floor" bug in get_noise_profile + 0.0.2 ----- diff --git a/library/README.rst b/library/README.rst index 6bf510d..bd74b9d 100644 --- a/library/README.rst +++ b/library/README.rst @@ -75,6 +75,11 @@ Help & Support .. |Python Versions| image:: https://img.shields.io/pypi/pyversions/enviroplus.svg :target: https://pypi.python.org/pypi/enviroplus +0.0.3 +----- + +* Fix "self.noise_floor" bug in get_noise_profile + 0.0.2 ----- diff --git a/library/enviroplus/__init__.py b/library/enviroplus/__init__.py index d18f409..ffcc925 100644 --- a/library/enviroplus/__init__.py +++ b/library/enviroplus/__init__.py @@ -1 +1 @@ -__version__ = '0.0.2' +__version__ = '0.0.3' diff --git a/library/enviroplus/noise.py b/library/enviroplus/noise.py index 2e7472d..6830bd0 100644 --- a/library/enviroplus/noise.py +++ b/library/enviroplus/noise.py @@ -73,7 +73,7 @@ class Noise(): high_start = mid_start + int(sample_count * mid) noise_ceiling = high_start + int(sample_count * high) - amp_low = numpy.mean(magnitude[self.noise_floor:mid_start]) + amp_low = numpy.mean(magnitude[noise_floor:mid_start]) amp_mid = numpy.mean(magnitude[mid_start:high_start]) amp_high = numpy.mean(magnitude[high_start:noise_ceiling]) amp_total = (low + mid + high) / 3.0 diff --git a/library/setup.cfg b/library/setup.cfg index c8a3ace..83f89fa 100644 --- a/library/setup.cfg +++ b/library/setup.cfg @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- [metadata] name = enviroplus -version = 0.0.2 +version = 0.0.3 author = Philip Howard author_email = phil@pimoroni.com description = Enviro pHAT Plus environmental monitoring add-on for Raspberry Pi" @@ -33,10 +33,10 @@ install_requires = ltr559 st7735 ads1015 - fonts - font-roboto - astral - pytz + fonts + font-roboto + astral + pytz sounddevice [flake8] @@ -56,12 +56,16 @@ py2deps = python-numpy python-smbus python-pil + python-spidev + python-rpi.gpio libportaudio2 py3deps = python3-pip python3-numpy python3-smbus python3-pil + python3-spidev + python3-rpi.gpio libportaudio2 configtxt = dtoverlay=pi3-miniuart-bt