mirror of
https://github.com/eclipse/upm.git
synced 2025-06-08 14:20:38 +03:00
tsl2561: fix indentation of example
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
parent
ac9cd1afa3
commit
5477321ce7
@ -30,21 +30,17 @@
|
|||||||
|
|
||||||
int main (int argc, char **argv)
|
int main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
mraa_result_t error = MRAA_SUCCESS;
|
mraa_result_t error = MRAA_SUCCESS;
|
||||||
upm::TSL2561 *sensor = NULL;
|
upm::TSL2561 *sensor = NULL;
|
||||||
int loopCount = 100;
|
int loopCount = 100;
|
||||||
|
|
||||||
//! [Interesting]
|
//! [Interesting]
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
printf("Provide loop count \n");
|
printf("Provide loop count \n");
|
||||||
} else {
|
} else {
|
||||||
loopCount = atoi(argv[1]);
|
loopCount = atoi(argv[1]);
|
||||||
}
|
}
|
||||||
sensor = new upm::TSL2561();
|
sensor = new upm::TSL2561();
|
||||||
//sensor = new upm::TSL2561(0, TSL2561_Address, GAIN_16X, INTEGRATION_TIME2_402MS);
|
|
||||||
//sensor = new upm::TSL2561(0, TSL2561_Address, GAIN_16X, INTEGRATION_TIME1_101MS);
|
|
||||||
//sensor = new upm::TSL2561(0, TSL2561_Address, GAIN_16X, INTEGRATION_TIME0_13MS);
|
|
||||||
//sensor = new upm::TSL2561(0, TSL2561_Address, GAIN_0X, INTEGRATION_TIME2_402MS);
|
|
||||||
|
|
||||||
for(int i=0; i< loopCount; i++){
|
for(int i=0; i< loopCount; i++){
|
||||||
fprintf(stdout, "Lux = %d\n", sensor->getLux());
|
fprintf(stdout, "Lux = %d\n", sensor->getLux());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user