MiddleWare GUS

Dependents:   MainTaskGus

Files at this revision

API Documentation at this revision

Comitter:
RoHe
Date:
Thu Dec 10 23:28:58 2015 +0000
Parent:
3:d527bae62c60
Commit message:
update Sensors People

Changed in this revision

Sensors.cpp Show annotated file Show diff for this revision Revisions of this file
Sensors.h Show annotated file Show diff for this revision Revisions of this file
StringManager.cpp Show annotated file Show diff for this revision Revisions of this file
StringManager.h Show annotated file Show diff for this revision Revisions of this file
--- a/Sensors.cpp	Thu Dec 10 05:03:13 2015 +0000
+++ b/Sensors.cpp	Thu Dec 10 23:28:58 2015 +0000
@@ -108,7 +108,7 @@
 {
     static int CDistance = 0;
     static int CDistance2 = 0;
-    int PersonNumber = 0;
+    static unsigned int PersonNumber = 0;
     static int flag=0;
     mu.startUpdates();//start mesuring the distance
     mu2.startUpdates();//start mesuring the distance
--- a/Sensors.h	Thu Dec 10 05:03:13 2015 +0000
+++ b/Sensors.h	Thu Dec 10 23:28:58 2015 +0000
@@ -36,7 +36,7 @@
 static DigitalIn LIGHTSTATUS(D8);
 //END LIGHT FEEDBACK INPUT
 
- static int PersonNumber;
+ static unsigned int PersonNumber;
 
 
 /*Extern Functions*/
--- a/StringManager.cpp	Thu Dec 10 05:03:13 2015 +0000
+++ b/StringManager.cpp	Thu Dec 10 23:28:58 2015 +0000
@@ -15,6 +15,8 @@
 #include <stdlib.h>
 #include "StringManager.h"
 
+unsigned int global_people;
+
 StringManager::StringManager()
 {
     varInt=5;
@@ -264,10 +266,10 @@
     }
     
     //GET PEOPLE
-     int num_people = PersonNumber;
+     printf("PersonNumber: %u\n\r",global_people);
     //int num_people = 123456;//HARDCODED PLEASE REMOVE
     static char aux_buffer [50];
-    sprintf (aux_buffer,"%d",num_people);
+    sprintf (aux_buffer,"%d",global_people);
     strcat(initialString,":people:");
     strcat(initialString,aux_buffer);
     
--- a/StringManager.h	Thu Dec 10 05:03:13 2015 +0000
+++ b/StringManager.h	Thu Dec 10 23:28:58 2015 +0000
@@ -18,6 +18,8 @@
 #ifndef STRINGMANAGER_H_
 #define STRINGMANAGER_H_
 
+extern unsigned int global_people;
+
 class StringManager {
    
 public: