Added more code for side and angled sensor

Dependencies:   QEI2 PID Watchdog VL53L1X_Filter BNOWrapper ros_lib_kinetic

Committer:
jvfausto
Date:
Mon Jul 01 06:03:43 2019 +0000
Revision:
28:6d6bd8ad04dc
Parent:
27:da718b990837
Child:
31:06f2362caf12
a

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jvfausto 28:6d6bd8ad04dc 1 #ifndef statistics_h //improvement: #ifndef _STATISTICS_h (purpose: good coding practice)
jvfausto 28:6d6bd8ad04dc 2 #define statistics_h // #define _STATISTICS_h
jvfausto 27:da718b990837 3
jvfausto 27:da718b990837 4 #include "mbed.h"
jvfausto 27:da718b990837 5
jvfausto 28:6d6bd8ad04dc 6 // Capitalize the first letter of class name (good coding practice/how to distinguish class from function)
jvfausto 27:da718b990837 7 class statistics
jvfausto 27:da718b990837 8 {
jvfausto 27:da718b990837 9 public:
jvfausto 28:6d6bd8ad04dc 10 //Defining default constructor
jvfausto 27:da718b990837 11 statistics(int* Input, int dataLength, int firstDataPoint = 0);
jvfausto 28:6d6bd8ad04dc 12 //Defining methods
jvfausto 27:da718b990837 13 double stdev();
jvfausto 27:da718b990837 14 double mean();
jvfausto 27:da718b990837 15
jvfausto 27:da718b990837 16 private:
jvfausto 28:6d6bd8ad04dc 17 int* data; //pointer to data
jvfausto 27:da718b990837 18 int dataLength;
jvfausto 28:6d6bd8ad04dc 19 int firstDataPoint;
jvfausto 27:da718b990837 20
jvfausto 27:da718b990837 21
jvfausto 27:da718b990837 22 };
jvfausto 27:da718b990837 23
jvfausto 28:6d6bd8ad04dc 24 #endif