Skip to content

Commit 97ee1d8

Browse files
committed
Fix noise_floor bug
1 parent ed42179 commit 97ee1d8

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

library/CHANGELOG.txt

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.0.3
2+
-----
3+
4+
* Fix "self.noise_floor" bug in get_noise_profile
5+
16
0.0.2
27
-----
38

library/README.rst

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ Help & Support
7575
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/enviroplus.svg
7676
:target: https://pypi.python.org/pypi/enviroplus
7777

78+
0.0.3
79+
-----
80+
81+
* Fix "self.noise_floor" bug in get_noise_profile
82+
7883
0.0.2
7984
-----
8085

library/enviroplus/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.0.2'
1+
__version__ = '0.0.3'

library/enviroplus/noise.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_noise_profile(self,
7373
high_start = mid_start + int(sample_count * mid)
7474
noise_ceiling = high_start + int(sample_count * high)
7575

76-
amp_low = numpy.mean(magnitude[self.noise_floor:mid_start])
76+
amp_low = numpy.mean(magnitude[noise_floor:mid_start])
7777
amp_mid = numpy.mean(magnitude[mid_start:high_start])
7878
amp_high = numpy.mean(magnitude[high_start:noise_ceiling])
7979
amp_total = (low + mid + high) / 3.0

library/setup.cfg

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
[metadata]
33
name = enviroplus
4-
version = 0.0.2
4+
version = 0.0.3
55
author = Philip Howard
66
author_email = [email protected]
77
description = Enviro pHAT Plus environmental monitoring add-on for Raspberry Pi"
@@ -33,10 +33,10 @@ install_requires =
3333
ltr559
3434
st7735
3535
ads1015
36-
fonts
37-
font-roboto
38-
astral
39-
pytz
36+
fonts
37+
font-roboto
38+
astral
39+
pytz
4040
sounddevice
4141
4242
[flake8]
@@ -56,12 +56,16 @@ py2deps =
5656
python-numpy
5757
python-smbus
5858
python-pil
59+
python-spidev
60+
python-rpi.gpio
5961
libportaudio2
6062
py3deps =
6163
python3-pip
6264
python3-numpy
6365
python3-smbus
6466
python3-pil
67+
python3-spidev
68+
python3-rpi.gpio
6569
libportaudio2
6670
configtxt =
6771
dtoverlay=pi3-miniuart-bt

0 commit comments

Comments
 (0)