Updated to work with recent Adafruit_Sensor update

pull/2/head
gshau 2018-02-11 17:11:05 -06:00
rodzic a8215e9e28
commit 6192f67a40
2 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -559,7 +559,7 @@ float SQM_TSL2591::calculateLux(uint16_t ch0, uint16_t ch1) /*wbp*/
@brief Gets the most recent sensor event
*/
/**************************************************************************/
void SQM_TSL2591::getEvent(sensors_event_t *event)
bool SQM_TSL2591::getEvent(sensors_event_t *event)
{
uint16_t ir, full;
uint32_t lum = getFullLuminosity();
@ -580,6 +580,7 @@ void SQM_TSL2591::getEvent(sensors_event_t *event)
/* Calculate the actual lux value */
/* 0 = sensor overflow (too much light) */
event->light = calculateLux(full, ir);
return true;
}
/**************************************************************************/

Wyświetl plik

@ -163,8 +163,8 @@ class SQM_TSL2591 : public Adafruit_Sensor
void bumpTime(int bumpDirection);
/* Unified Sensor API Functions */
void getEvent ( sensors_event_t* );
void getSensor ( sensor_t* );
bool getEvent ( sensors_event_t* );
void getSensor ( sensor_t* );
private:
tsl2591IntegrationTime_t _integration;