diff --git a/examples/ppd42ns.cxx b/examples/ppd42ns.cxx index fd26a11c..38a64e5a 100644 --- a/examples/ppd42ns.cxx +++ b/examples/ppd42ns.cxx @@ -45,7 +45,7 @@ int main () //! [Interesting] // Instantiate a dust sensor on GPIO pin D8 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; while (shouldRun) { diff --git a/src/ppd42ns/ppd42ns.h b/src/ppd42ns/ppd42ns.h index 90294008..4cb086a9 100644 --- a/src/ppd42ns/ppd42ns.h +++ b/src/ppd42ns/ppd42ns.h @@ -27,6 +27,8 @@ #include #include +namespace upm { + typedef struct { int lowPulseOccupancy; @@ -34,7 +36,6 @@ typedef struct double concentration; } dustData; -namespace upm { /** * @brief C++ API for the Dust Sensor