Skip to content

Commit

Permalink
numpy api fix 1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Zontex committed Feb 23, 2021
1 parent 979befd commit 6fa3f3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Eduponics/__pycache__/*
dist/*
micropython_eduponics.egg-info/*
2 changes: 1 addition & 1 deletion Eduponics/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.4"
__version__ = "1.0.5"
6 changes: 3 additions & 3 deletions Eduponics/tds.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import time
from Eduponics import ads1x15
from ulab import *
from ulab import array,numerical
from machine import I2C, Pin
import time

Expand Down Expand Up @@ -72,7 +72,7 @@ def read(self):
buffer = [value1,value2]
self.overwrite_buffer(buffer)
# turn the list into numpy array
double_buffer = numpy.array(self.values_buffer)
double_buffer = array(self.values_buffer)
# run median_filter on the numpy array
median_voltage = self.median_filter(double_buffer) * self.vref / 1024.0;
# calculate voltage based on temperature compensation
Expand All @@ -85,4 +85,4 @@ def read(self):
return 0

def median_filter(self, data):
return numpy.mean(data)
return numerical.mean(data)

0 comments on commit 6fa3f3a

Please sign in to comment.