mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00

Ran clang-format on modified files Signed-off-by: Serban Waltter <serban.waltter@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
29 lines
576 B
C++
29 lines
576 B
C++
#include <iostream>
|
|
#include <list>
|
|
|
|
#include "apds9002.hpp"
|
|
#include "bh1750.hpp"
|
|
#include "max44009.hpp"
|
|
|
|
int
|
|
main()
|
|
{
|
|
std::list<upm::iLight*> lightSensors;
|
|
|
|
// Populate list of light sensors
|
|
lightSensors.push_back(new upm::APDS9002(0));
|
|
lightSensors.push_back(new upm::BH1750());
|
|
lightSensors.push_back(new upm::MAX44009(1));
|
|
|
|
// Measure luminance level from all 3 individual sensors
|
|
for (auto& sensor : lightSensors) {
|
|
sensor->getLuminance();
|
|
}
|
|
|
|
for (auto& sensor : lightSensors) {
|
|
delete sensor;
|
|
}
|
|
|
|
return 0;
|
|
}
|