ppd42ns: Move dustData to upm namespace

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
This commit is contained in:
Brendan Le Foll 2015-01-17 10:07:10 +00:00 committed by Sarah Knepper
parent 3494bd2008
commit 121caf0829
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,7 @@ int main ()
//! [Interesting] //! [Interesting]
// Instantiate a dust sensor on GPIO pin D8 // Instantiate a dust sensor on GPIO pin D8
upm::PPD42NS* dust = new upm::PPD42NS(8); upm::PPD42NS* dust = new upm::PPD42NS(8);
dustData data; upm::dustData data;
cout << "This program will give readings every 30 seconds until you stop it" << endl; cout << "This program will give readings every 30 seconds until you stop it" << endl;
while (shouldRun) while (shouldRun)
{ {

View File

@ -27,6 +27,8 @@
#include <time.h> #include <time.h>
#include <mraa/aio.h> #include <mraa/aio.h>
namespace upm {
typedef struct typedef struct
{ {
int lowPulseOccupancy; int lowPulseOccupancy;
@ -34,7 +36,6 @@ typedef struct
double concentration; double concentration;
} dustData; } dustData;
namespace upm {
/** /**
* @brief C++ API for the Dust Sensor * @brief C++ API for the Dust Sensor