Robot's heading hold program using PID of input from sensor and output to motors

Revision:
0:2396598427bf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/headingHold.h	Thu Dec 07 00:54:11 2017 +0900
@@ -0,0 +1,23 @@
+#ifndef HEADING_HOLD_H
+#define HEADING_HOLD_H
+#include "mbed.h"
+#include "PID.h"
+
+class headingHold {
+private:
+  bool holding;
+  float currentHeading;
+  float targetHeading;
+  PID headingPID;
+
+public:
+  headingHold (double p,double i,double d);
+  bool setHeadingHold(const bool& hold);
+  bool setCurrentHeading(const double& heading);
+  bool setTargetHeading(const double& target);
+  double getOutput();
+
+};
+
+
+#endif /* end of include guard: HEADING_HOLD_H */