From 9bd043e5a9ca5041990ec98c3ef3e6e34585ebf3 Mon Sep 17 00:00:00 2001 From: Kevin Townsend Date: Wed, 5 Mar 2014 03:20:00 +0100 Subject: [PATCH] Updated function name to match enableAutoRange in Adafruit_Sensor --- Adafruit_TSL2561_U.cpp | 2 +- Adafruit_TSL2561_U.h | 2 +- examples/sensorapi/sensorapi.pde | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Adafruit_TSL2561_U.cpp b/Adafruit_TSL2561_U.cpp index d47d720..7d1358c 100644 --- a/Adafruit_TSL2561_U.cpp +++ b/Adafruit_TSL2561_U.cpp @@ -217,7 +217,7 @@ boolean Adafruit_TSL2561_Unified::begin(void) data from the sensor */ /**************************************************************************/ -void Adafruit_TSL2561_Unified::enableAutoGain(bool enable) +void Adafruit_TSL2561_Unified::enableAutoRange(bool enable) { _tsl2561AutoGain = enable ? true : false; } diff --git a/Adafruit_TSL2561_U.h b/Adafruit_TSL2561_U.h index f53c523..6d6b78e 100644 --- a/Adafruit_TSL2561_U.h +++ b/Adafruit_TSL2561_U.h @@ -174,7 +174,7 @@ class Adafruit_TSL2561_Unified : public Adafruit_Sensor { boolean begin(void); /* TSL2561 Functions */ - void enableAutoGain(bool enable); + void enableAutoRange(bool enable); void setIntegrationTime(tsl2561IntegrationTime_t time); void setGain(tsl2561Gain_t gain); void getLuminosity (uint16_t *broadband, uint16_t *ir); diff --git a/examples/sensorapi/sensorapi.pde b/examples/sensorapi/sensorapi.pde index a44a3d3..cacf9a7 100644 --- a/examples/sensorapi/sensorapi.pde +++ b/examples/sensorapi/sensorapi.pde @@ -69,7 +69,7 @@ void configureSensor(void) /* You can also manually set the gain or enable auto-gain support */ // tsl.setGain(TSL2561_GAIN_1X); /* No gain ... use in bright light to avoid sensor saturation */ // tsl.setGain(TSL2561_GAIN_16X); /* 16x gain ... use in low light to boost sensitivity */ - tsl.enableAutoGain(true); /* Auto-gain ... switches automatically between 1x and 16x */ + tsl.enableAutoRange(true); /* Auto-gain ... switches automatically between 1x and 16x */ /* Changing the integration time gives you better sensor resolution (402ms = 16-bit data) */ tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_13MS); /* fast but low resolution */