Skip to content

Commit

Permalink
Corrected default smoothMode for #15
Browse files Browse the repository at this point in the history
  • Loading branch information
MattFryer authored Dec 20, 2024
1 parent c5dfb48 commit 3b3fbd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Smoothed.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
template <typename T>
class Smoothed {
private:
byte smoothMode;
byte smoothMode = SMOOTHED_EXPONENTIAL;
uint16_t smoothReadingsFactor = 10; // The smoothing factor. In average mode, this is the number of readings to average.
uint16_t smoothReadingsPosition = 0; // Current position in the array
uint16_t smoothReadingsNum = 0; // Number of readings currently being averaged
T *smoothReading; // Array of readings
public:
Smoothed();
~Smoothed(); // Destructor to clean up when class instance killed
bool begin (byte smoothMode, uint16_t smoothFactor = 10);
bool begin (byte smoothMode = SMOOTHED_EXPONENTIAL, uint16_t smoothFactor = 10);
bool add (T newReading);
T get ();
T getLast ();
Expand Down

0 comments on commit 3b3fbd1

Please sign in to comment.