Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: QEI2 PID Watchdog VL53L1X_Filter ros_lib_kinetic
Diff: wheelchairControlSideTof/Statistics/statistics.h
- Revision:
- 18:a10277a63b53
diff -r 770a161346ed -r a10277a63b53 wheelchairControlSideTof/Statistics/statistics.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wheelchairControlSideTof/Statistics/statistics.h	Tue Jul 02 17:27:51 2019 +0000
@@ -0,0 +1,24 @@
+#ifndef statistics_h               //improvement: #ifndef _STATISTICS_h  (purpose: good coding practice)
+#define statistics_h               //             #define _STATISTICS_h
+ 
+#include "mbed.h"
+
+// Capitalize the first letter of class name (good coding practice/how to distinguish class from function)
+class statistics 
+{ 
+public: 
+    //Defining default constructor
+    statistics(int* Input, double dataLength, int firstDataPoint = 0); 
+    //Defining methods
+    double stdev();
+    double mean();
+    
+  private:
+   int* data;                                       //pointer to data
+   double dataLength;
+   int firstDataPoint;
+
+    
+};
+
+#endif
\ No newline at end of file