Filter: add override keyword

This commit is contained in:
Peter Barker 2018-11-07 22:26:57 +11:00 committed by Andrew Tridgell
parent bc212073a2
commit 1056321457
4 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

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

View File

@ -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 {

View File

@ -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 {