Minor fixes

Dependencies:   LPS25H hts221

Fork of Coursework by Group PAG

Revision:
44:2b23c7407547
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MyQueue.cpp	Thu May 04 14:54:07 2017 +0000
@@ -0,0 +1,44 @@
+#include "MyQueue.h"
+
+
+MyQueue::MyQueue(){
+    maxSize = 120;
+    front = 0;
+    back = 0;
+    isFull = false;
+    storage = new Reading[maxSize];
+}
+    
+void MyQueue::push(Reading r){
+    //if it is full then the front must move. if front is max then it must become 0
+    if (isFull == true){
+        if (front == maxSize-1){
+            front = 0;
+            }
+        else{
+            front = front +1; 
+            }
+        back = back +1;
+        storage[back] = r;        
+    }
+
+    //otherwise the MyQueue is full
+    else {
+        
+    }
+}
+void MyQueue::read(int nR){// where nR is the number to read, if REAL ALL is typed then the method will be called by something like MyQueue.read(MyQueue.count).
+        if (front>back){
+          for( int a = back; a >=0; a = a - 1 ) {
+          //print or cout? do until end of loop - think about how to loop over
+           }
+        }
+        for( int a = maxSize-1; a >front; a = a + 1 ) {
+          //print or cout? do until end of loop - think about how to loop over
+        }
+}
+
+void MyQueue::deleteRecords(int nD){ //as above but nD is number to delete
+    
+    
+}