From fc0d31e21bb8b3e11a10d074429a18cd16ba09b0 Mon Sep 17 00:00:00 2001 From: alexschwantes Date: Mon, 8 May 2017 15:52:03 +0200 Subject: [PATCH] Removing hard coded I2CAddress Removed hard-coded I2CAddress "0x5B" from constructor which caused issues when trying to use the alternative address "0x5A". Also, removed member assignment of I2CAddress as it is done by member initialisation list in constructor. --- src/SparkFunCCS811.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/SparkFunCCS811.cpp b/src/SparkFunCCS811.cpp index d9f8bab..b6d3d58 100644 --- a/src/SparkFunCCS811.cpp +++ b/src/SparkFunCCS811.cpp @@ -35,17 +35,13 @@ Distributed as-is; no warranty is given. //****************************************************************************// // -// LIS3DHCore functions -// -// For I2C, construct LIS3DHCore myIMU(
); +// CCS811Core functions // // Default
is 0x5B. // //****************************************************************************// -CCS811Core::CCS811Core( uint8_t inputArg ) : I2CAddress(0x5B) +CCS811Core::CCS811Core( uint8_t inputArg ) : I2CAddress(inputArg) { - I2CAddress = inputArg; - } CCS811Core::status CCS811Core::beginCore(void) @@ -535,4 +531,4 @@ float CCS811::getResistance( void ) float CCS811::getTemperature( void ) { return temperature; -} \ No newline at end of file +}