Library for thread to determine AGV location

Files at this revision

API Documentation at this revision

Comitter:
williampeers
Date:
Wed Aug 23 02:26:03 2017 +0000
Commit message:

Changed in this revision

positioning.cpp Show annotated file Show diff for this revision Revisions of this file
positioning.h Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 6a51b6fe2114 positioning.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/positioning.cpp	Wed Aug 23 02:26:03 2017 +0000
@@ -0,0 +1,26 @@
+#include "positioning.h"
+
+/*
+Initialise object.
+Call initators for any local objects.
+*/
+Positioning::Positioning(osPriority priority, int memory) {
+    positioning_thread = new Thread(priority, memory);
+    
+}
+
+/*
+Infinite loop that will be run. like a main loop.
+*/
+void Positioning::run() {
+    while (true) {
+        
+    }
+}
+
+/*
+Called by main at the start of operation to start the thread running.
+*/
+void Positioning::start() {
+    positioning_thread.start(callback(this, &Positioning::run));
+}
\ No newline at end of file
diff -r 000000000000 -r 6a51b6fe2114 positioning.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/positioning.h	Wed Aug 23 02:26:03 2017 +0000
@@ -0,0 +1,16 @@
+#ifndef __POSITIONING_INCLUDED__
+#define __POSITIONING_INCLUDED__
+
+#include "mbed.h"
+
+class Positioning{
+private:
+    Thread positioning_thread;
+    void run();
+
+public:
+    Positioning(osPriority, int);
+    void start();
+};
+
+#endif
\ No newline at end of file