Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 4:a7da6ca6aef2, committed 2015-12-10
- Comitter:
- RoHe
- Date:
- Thu Dec 10 23:28:58 2015 +0000
- Parent:
- 3:d527bae62c60
- Commit message:
- update Sensors People
Changed in this revision
--- 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: