Releases: JChristensen/movingAvg
Releases · JChristensen/movingAvg
Arduino movingAvg Library 2.3.2
Add an optional parameter to the constructor to cause getAvg() to return zero instead of causing a divide-by-zero situation if it is called before any readings are recorded.
Arduino movingAvg Library 2.3.1
- Fix calculation for most recent "n" points (i.e. the
getAvg(int)
function) - If given an improper number of points,
getAvg(int)
now returns zero.
Arduino movingAvg Library 2.3.0
- Add method to calculate shorter-term average using only a specified number of the most recent data points.
- Add example sketch to demonstrate new method.
Arduino movingAvg Library 2.2.0
Add function to return pointer to readings array.
Add example sketch to demonstrate.
Update README.
Arduino movingAvg Library 2.1.1
Add getCount() function.
Arduino movingAvg Library 2.1.0
Changes in this release
- Added
reset()
function to restart the moving average calculation.
Arduino movingAvg Library 2.0.0
Changes in this release
- Interval array is now dynamically allocated using the size passed to the constructor. This allows using different moving average interval sizes (i.e. the number of data points used for the average) without having to change the library, and also allows different
movingAvg
objects to have different interval sizes. See the README file for cautions regarding dynamic memory allocation. - Changed the calculation method for the average when the interval array is not yet full. Previous behavior was to fill the interval array with the value provided with the first call to
reading()
, and to always calculate the average using the full array. Now the library tracks the number of entries in the array and until the array is full, only uses the actual data values supplied for the average. (Thanks, Duckie!) - Added more example sketches, converted doc files to Markdown, changed to GNU GPL 3.0, general cleanup, style and cosmetic tweaks.