Simple moving average filter.

Committer:
jonebuckman
Date:
Fri Mar 01 12:26:19 2019 +0000
Revision:
4:9002522153d7
Parent:
3:63b077baff96
Added documentation.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jonebuckman 4:9002522153d7 1 /* Simple moving average filter
jonebuckman 4:9002522153d7 2 * Copyright (c) 2019 Jon Buckman
jonebuckman 4:9002522153d7 3 *
jonebuckman 4:9002522153d7 4 * Licensed under the Apache License, Version 2.0 (the "License");
jonebuckman 4:9002522153d7 5 * you may not use this file except in compliance with the License.
jonebuckman 4:9002522153d7 6 * You may obtain a copy of the License at
jonebuckman 4:9002522153d7 7 *
jonebuckman 4:9002522153d7 8 * http://www.apache.org/licenses/LICENSE-2.0
jonebuckman 4:9002522153d7 9 *
jonebuckman 4:9002522153d7 10 * Unless required by applicable law or agreed to in writing, software
jonebuckman 4:9002522153d7 11 * distributed under the License is distributed on an "AS IS" BASIS,
jonebuckman 4:9002522153d7 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
jonebuckman 4:9002522153d7 13 * See the License for the specific language governing permissions and
jonebuckman 4:9002522153d7 14 * limitations under the License.
jonebuckman 4:9002522153d7 15 */
KarimAzzouz 0:c1b48befe066 16 #ifndef MAF_H
KarimAzzouz 0:c1b48befe066 17 #define MAF_H
KarimAzzouz 0:c1b48befe066 18
jonebuckman 4:9002522153d7 19 #include <mbed.h>
KarimAzzouz 0:c1b48befe066 20
joe4465 2:21b70641f866 21 class MAF
joe4465 2:21b70641f866 22 {
KarimAzzouz 0:c1b48befe066 23 public:
joe4465 2:21b70641f866 24 MAF();
KarimAzzouz 1:fbc57eb4e61d 25 float update(float data);
KarimAzzouz 0:c1b48befe066 26
KarimAzzouz 0:c1b48befe066 27 private :
jonebuckman 3:63b077baff96 28 //float _k[10];
jonebuckman 3:63b077baff96 29 float _k[4];
KarimAzzouz 0:c1b48befe066 30 float _result;
KarimAzzouz 0:c1b48befe066 31 };
KarimAzzouz 0:c1b48befe066 32
KarimAzzouz 0:c1b48befe066 33 #endif