mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
examples/c++/<sensor>.cxx: changed cout / endl to std::cout / std::endl
Signed-off-by: Norbert Wesp <nwesp@phytec.de> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
aecdac255d
commit
545e288967
@ -42,7 +42,7 @@ int main(int argc, char **argv)
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
//! [Interesting]
|
||||
cout << "Initializing test-application..." << endl;
|
||||
std::cout << "Initializing test-application..." << std::endl;
|
||||
|
||||
// Instantiate an HDC1000 instance on bus 1
|
||||
upm::HDC1000 *mySensor = new upm::HDC1000(1);
|
||||
@ -50,15 +50,15 @@ int main(int argc, char **argv)
|
||||
// update and print available values every second
|
||||
while (run)
|
||||
{
|
||||
cout << "Humidity: " << mySensor->getHumidity(true) << endl
|
||||
<< "Temperature: " << mySensor->getTemperature(true) << endl;
|
||||
std::cout << "Humidity: " << mySensor->getHumidity(true) << std::endl
|
||||
<< "Temperature: " << mySensor->getTemperature(true) << std::endl;
|
||||
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
cout << "Exiting test-application..." << endl;
|
||||
std::cout << "Exiting test-application..." << std::endl;
|
||||
|
||||
delete mySensor;
|
||||
//! [Interesting]
|
||||
|
@ -44,7 +44,7 @@ int main(int argc, char **argv)
|
||||
//! [Interesting]
|
||||
upm::mag3110_data_t data;
|
||||
|
||||
cout << "Initializing test-application..." << endl;
|
||||
std::cout << "Initializing test-application..." << std::endl;
|
||||
|
||||
// Instantiate an MAG3110 instance on bus 1
|
||||
upm::MAG3110 *mySensor = new upm::MAG3110(1);
|
||||
@ -56,18 +56,18 @@ int main(int argc, char **argv)
|
||||
while (run)
|
||||
{
|
||||
mySensor->getData (&data, true);
|
||||
cout << "x: " << data.x << endl
|
||||
<< "y: " << data.y << endl
|
||||
<< "z: " << data.z << endl
|
||||
<< "Status: " << data.status << endl
|
||||
<< "Die temperature: " << data.dtemp << endl;
|
||||
std::cout << "x: " << data.x << std::endl
|
||||
<< "y: " << data.y << std::endl
|
||||
<< "z: " << data.z << std::endl
|
||||
<< "Status: " << data.status << std::endl
|
||||
<< "Die temperature: " << data.dtemp << std::endl;
|
||||
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
cout << "Exiting test-application..." << endl;
|
||||
std::cout << "Exiting test-application..." << std::endl;
|
||||
|
||||
delete mySensor;
|
||||
//! [Interesting]
|
||||
|
@ -55,7 +55,7 @@ int main(int argc, char **argv)
|
||||
params.offsetZ = <z-axis offset>; between 0 and 255
|
||||
*/
|
||||
|
||||
cout << "Initializing test-application..." << endl;
|
||||
std::cout << "Initializing test-application..." << std::endl;
|
||||
|
||||
// Instantiate an MMA8X5X instance on bus 1 with default parameters
|
||||
// The sensor-type will be detected by reading out the device-id
|
||||
@ -73,16 +73,16 @@ int main(int argc, char **argv)
|
||||
while (run)
|
||||
{
|
||||
mySensor->getData (&data, true);
|
||||
cout << "x: " << (int)data.x << endl
|
||||
<< "y: " << (int)data.y << endl
|
||||
<< "z: " << (int)data.z << endl;
|
||||
std::cout << "x: " << (int)data.x << std::endl
|
||||
<< "y: " << (int)data.y << std::endl
|
||||
<< "z: " << (int)data.z << std::endl;
|
||||
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
cout << "Exiting test-application..." << endl;
|
||||
std::cout << "Exiting test-application..." << std::endl;
|
||||
|
||||
delete mySensor;
|
||||
//! [Interesting]
|
||||
|
@ -44,7 +44,7 @@ int main(int argc, char **argv)
|
||||
//! [Interesting]
|
||||
upm::tcs37727_data_t data;
|
||||
|
||||
cout << "Initializing test-application..." << endl;
|
||||
std::cout << "Initializing test-application..." << std::endl;
|
||||
|
||||
// Instantiate an TCS37727 instance on bus 1
|
||||
upm::TCS37727 *mySensor = new upm::TCS37727(1);
|
||||
@ -56,19 +56,19 @@ int main(int argc, char **argv)
|
||||
while (run)
|
||||
{
|
||||
mySensor->getData (&data, true);
|
||||
cout << "Red: " << (int)data.red << endl
|
||||
<< "Green: " << (int)data.green << endl
|
||||
<< "Blue: " << (int)data.blue << endl
|
||||
<< "Clear: " << (int)data.clear << endl
|
||||
<< "Lux: " << (int)data.lux << endl
|
||||
<< "Color temperature: " << (int)data.ct << endl;
|
||||
std::cout << "Red: " << (int)data.red << std::endl
|
||||
<< "Green: " << (int)data.green << std::endl
|
||||
<< "Blue: " << (int)data.blue << std::endl
|
||||
<< "Clear: " << (int)data.clear << std::endl
|
||||
<< "Lux: " << (int)data.lux << std::endl
|
||||
<< "Color temperature: " << (int)data.ct << std::endl;
|
||||
|
||||
cout << endl;
|
||||
std::cout << std::endl;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
cout << "Exiting test-application..." << endl;
|
||||
std::cout << "Exiting test-application..." << std::endl;
|
||||
|
||||
delete mySensor;
|
||||
//! [Interesting]
|
||||
|
@ -42,7 +42,7 @@ int main(int argc, char **argv)
|
||||
signal(SIGINT, sig_handler);
|
||||
|
||||
//! [Interesting]
|
||||
cout << "Initializing test-application..." << endl;
|
||||
std::cout << "Initializing test-application..." << std::endl;
|
||||
|
||||
// Instantiate an TMP006 instance on bus 1
|
||||
upm::TMP006 *mySensor = new upm::TMP006(1);
|
||||
@ -54,13 +54,13 @@ int main(int argc, char **argv)
|
||||
while (run)
|
||||
{
|
||||
// Print out temperature value in °C
|
||||
cout << "Temperature: " << mySensor->getTemperature(true) << " °C"
|
||||
<< endl;
|
||||
std::cout << "Temperature: " << mySensor->getTemperature(true) << " °C"
|
||||
<< std::endl;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
cout << "Exiting test-application..." << endl;
|
||||
std::cout << "Exiting test-application..." << std::endl;
|
||||
|
||||
delete mySensor;
|
||||
//! [Interesting]
|
||||
|
Loading…
x
Reference in New Issue
Block a user