mirror of
https://github.com/eclipse/upm.git
synced 2025-07-01 17:31:13 +03:00
Removed commented code
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>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
664c6dd8c6
commit
57c0c8c235
@ -5,27 +5,24 @@
|
||||
#include "bh1750.hpp"
|
||||
#include "max44009.hpp"
|
||||
|
||||
// using namespace std;
|
||||
// using namespace upm;
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
std::list<upm::iLight*> lightSensors;
|
||||
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));
|
||||
// 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();
|
||||
}
|
||||
// Measure luminance level from all 3 individual sensors
|
||||
for (auto& sensor : lightSensors) {
|
||||
sensor->getLuminance();
|
||||
}
|
||||
|
||||
for (auto& sensor : lightSensors) {
|
||||
delete sensor;
|
||||
}
|
||||
for (auto& sensor : lightSensors) {
|
||||
delete sensor;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,26 +1,26 @@
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include "lm35.hpp"
|
||||
#include "abp.hpp"
|
||||
|
||||
// using namespace std;
|
||||
// using namespace upm;
|
||||
#include "lm35.hpp"
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
std::vector<upm::iTemperature*> tempSensors {new upm::LM35(0), new upm::ABP(0, ABP_DEFAULT_ADDRESS)};
|
||||
std::vector<upm::iTemperature*> tempSensors{ new upm::LM35(0),
|
||||
new upm::ABP(0, ABP_DEFAULT_ADDRESS) };
|
||||
|
||||
for (auto& sensor : tempSensors) {
|
||||
float celsiusTemp = sensor->getTemperature();
|
||||
std::cout << "Temperature in Celsius degrees: " << celsiusTemp << std::endl;
|
||||
std::cout << "Temperature in Kelvin: " << upm::iTemperature::convertCelsiusTo(celsiusTemp, upm::TemperatureUnit::KELVIN) << std::endl;
|
||||
}
|
||||
for (auto& sensor : tempSensors) {
|
||||
float celsiusTemp = sensor->getTemperature();
|
||||
std::cout << "Temperature in Celsius degrees: " << celsiusTemp << std::endl;
|
||||
std::cout << "Temperature in Kelvin: "
|
||||
<< upm::iTemperature::convertCelsiusTo(celsiusTemp, upm::TemperatureUnit::KELVIN)
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
for (auto& sensor : tempSensors) {
|
||||
delete sensor;
|
||||
}
|
||||
for (auto& sensor : tempSensors) {
|
||||
delete sensor;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user