Skip to content

Commit

Permalink
Added time scale factor. v1.0 done.
Browse files Browse the repository at this point in the history
  • Loading branch information
02bwilson committed Jul 16, 2023
1 parent 027d4ca commit b6721ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DataManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@


class DataManager(QThread):
_TIME_SCALE_FACTOR = 1.0

_IIR_ALPHA = .999

_SAMPLE_RATE = 64
Expand Down Expand Up @@ -73,7 +75,7 @@ def gatherData(self):
now = time.time()
curVal = 1
for fn in self.functions.values():
curVal = eval(str(curVal) + fn[0] + str(fn[1](now)))
curVal = eval(str(curVal) + fn[0] + str(fn[1](now * self._TIME_SCALE_FACTOR)))
if len(self.dataList[0]) == 4 * self._SAMPLE_RATE:
self.dataList[0].pop(0)
self.timeList.pop(0)
Expand Down

0 comments on commit b6721ae

Please sign in to comment.