Fix noise_floor bug
authorPhil Howard <phil@gadgetoid.com>
Mon, 16 Mar 2020 11:37:40 +0000 (11:37 +0000)
committerPhil Howard <phil@gadgetoid.com>
Mon, 16 Mar 2020 11:37:40 +0000 (11:37 +0000)
library/CHANGELOG.txt
library/README.rst
library/enviroplus/__init__.py
library/enviroplus/noise.py
library/setup.cfg

index 65825f28e5878c89824e9536996c0009ffa03583..81d41368479bb54fb100e8f23b7de929a0290211 100644 (file)
@@ -1,3 +1,8 @@
+0.0.3
+-----
+
+* Fix "self.noise_floor" bug in get_noise_profile
+
 0.0.2
 -----
 
index 6bf510d3c6d467109423d6ca52730a07bc09ae29..bd74b9d4095b0f24cd20a7d8521cd833c0daa07f 100644 (file)
@@ -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
 -----
 
index d18f4098ebe682d1f75ac14b0bd43edef9034ee6..ffcc925ae2ade5f8b863840f7c8a0e337341410c 100644 (file)
@@ -1 +1 @@
-__version__ = '0.0.2'
+__version__ = '0.0.3'
index 2e7472d1ea8120eec7739efeee989d358d7e728f..6830bd0dd7dc0ca04e5eb7e28ef4a8dcfc1f6d9f 100644 (file)
@@ -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
index c8a3ace3351dcb15d9cf90f133dfd250c4c54c65..83f89fa1bd20e2de7bc937eba9c01b29d14f9421 100644 (file)
@@ -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