diff --git a/src/tsl2561/tsl2561.cxx b/src/tsl2561/tsl2561.cxx index 9fa2b4d0..104b7017 100644 --- a/src/tsl2561/tsl2561.cxx +++ b/src/tsl2561/tsl2561.cxx @@ -83,10 +83,11 @@ TSL2561::~TSL2561() mraa_i2c_stop(m_i2ControlCtx); } -mraa_result_t -TSL2561::getLux(int &lux) +int +TSL2561::getLux() { mraa_result_t error = MRAA_SUCCESS; + int lux; uint16_t rawLuxCh0; uint16_t rawLuxCh1; uint8_t ch0_low, ch0_high, ch1_low, ch1_high; @@ -183,7 +184,7 @@ TSL2561::getLux(int &lux) // strip off fractional portion lux = tempLux >> LUX_SCALE; - return error; + return lux; } diff --git a/src/tsl2561/tsl2561.h b/src/tsl2561/tsl2561.h index 7a6762b8..a1a727ed 100644 --- a/src/tsl2561/tsl2561.h +++ b/src/tsl2561/tsl2561.h @@ -128,11 +128,9 @@ class TSL2561{ /** * Get calculated lux reading from TSL2561 * - * @param lux - place holder to receive calculated lux value from TSL2561 - * - * Return mraa_result_t + * @return the calculated lux value from the sensor */ - mraa_result_t getLux(int &lux); + int getLux(); private: /**