Denver Hayward / charQueue

Files at this revision

API Documentation at this revision

Comitter:
williampeers
Date:
Wed Aug 09 01:12:08 2017 +0000
Parent:
0:043b1271ed1b
Child:
2:8f54ba4d961f
Commit message:
Nothing

Changed in this revision

objectQueue.cpp Show annotated file Show diff for this revision Revisions of this file
objectQueue.h Show annotated file Show diff for this revision Revisions of this file
--- a/objectQueue.cpp	Wed Aug 02 03:21:02 2017 +0000
+++ b/objectQueue.cpp	Wed Aug 09 01:12:08 2017 +0000
@@ -92,7 +92,7 @@
     if (empty) {return(0);}
     while ((ret = get(buffer + ret, size - total)) > 0) {
         buffer += ret;
-        total += ret;
+        total++;
         ret = 0;
     }
     lock.unlock();
--- a/objectQueue.h	Wed Aug 02 03:21:02 2017 +0000
+++ b/objectQueue.h	Wed Aug 09 01:12:08 2017 +0000
@@ -2,6 +2,7 @@
 #define __STRQUEUE_INCLUDED__
 
 #include "mbed.h"
+#include "commands.h"
 
 class StrQueue {
 public:
@@ -12,7 +13,7 @@
     int get(char* str, int size);
     int getChars(char* chars, int size);
     bool isfull();
-    bool isEmpty();    
+    bool isEmpty();
     
 private:
     Mutex lock;