Browse Source

Filter: add override keyword

master
Peter Barker 6 years ago committed by Andrew Tridgell
parent
commit
1056321457
  1. 2
      libraries/Filter/AverageFilter.h
  2. 2
      libraries/Filter/DerivativeFilter.h
  3. 4
      libraries/Filter/FilterWithBuffer.h
  4. 2
      libraries/Filter/ModeFilter.h

2
libraries/Filter/AverageFilter.h

@ -33,7 +33,7 @@ public: @@ -33,7 +33,7 @@ public:
};
// apply - Add a new raw value to the filter, retrieve the filtered result
virtual T apply(T sample);
virtual T apply(T sample) override;
// reset - clear the filter
virtual void reset();

2
libraries/Filter/DerivativeFilter.h

@ -39,7 +39,7 @@ public: @@ -39,7 +39,7 @@ public:
float slope(void);
// reset - clear the filter
virtual void reset();
virtual void reset() override;
private:
bool _new_data;

4
libraries/Filter/FilterWithBuffer.h

@ -31,10 +31,10 @@ public: @@ -31,10 +31,10 @@ public:
FilterWithBuffer();
// apply - Add a new raw value to the filter, retrieve the filtered result
virtual T apply(T sample);
virtual T apply(T sample) override;
// reset - clear the filter
virtual void reset();
virtual void reset() override;
// get filter size
uint8_t get_filter_size() const {

2
libraries/Filter/ModeFilter.h

@ -30,7 +30,7 @@ public: @@ -30,7 +30,7 @@ public:
ModeFilter(uint8_t return_element);
// apply - Add a new raw value to the filter, retrieve the filtered result
virtual T apply(T sample);
virtual T apply(T sample) override;
// get - get latest filtered value from filter (equal to the value returned by latest call to apply method)
virtual T get() const {

Loading…
Cancel
Save