Skip to content

Commit 2d566a8

Browse files
winkjabrauchli
authored andcommitted
remove SHTSensor/SHT3xSensor ::setI2cAddress()
1 parent 592758f commit 2d566a8

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

SHTSensor.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,6 @@ bool SHTSensor::setAccuracy(SHTAccuracy newAccuracy)
284284
return mSensor->setAccuracy(newAccuracy);
285285
}
286286

287-
bool SHTSensor::setI2cAddress(uint8_t newAddress)
288-
{
289-
if (!mSensor)
290-
return false;
291-
return mSensor->setI2cAddress(newAddress);
292-
}
293-
294287
void SHTSensor::cleanup()
295288
{
296289
if (mSensor) {

SHTSensor.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,6 @@ class SHTSensor
137137
*/
138138
bool setAccuracy(SHTAccuracy newAccuracy);
139139

140-
/**
141-
* Set the i2c address the driver uses to communicate with the sensor,
142-
* if supported by the driver
143-
* Note: this will only cause the communication to address a different i2c
144-
* device but not cause the sensor to change it's listening address.
145-
* Returns true if the sensor address was changed
146-
*/
147-
bool setI2cAddress(uint8_t newAddress);
148-
149140
private:
150141
void cleanup();
151142

@@ -170,14 +161,6 @@ class SHTSensorDriver
170161
return false;
171162
}
172163

173-
/**
174-
* Set the i2c communication address.
175-
* Returns false if the sensor driver does not support different addresses
176-
*/
177-
virtual bool setI2cAddress(uint8_t newAddress) {
178-
return false;
179-
}
180-
181164
/** Returns true if the next sample was read and the values are cached */
182165
virtual bool readSample();
183166

@@ -234,11 +217,6 @@ class SHTI2cSensor : public SHTSensorDriver {
234217

235218
virtual bool readSample();
236219

237-
virtual bool setI2cAddress(uint8_t i2cAddress) {
238-
mI2cAddress = i2cAddress;
239-
return true;
240-
}
241-
242220
uint8_t mI2cAddress;
243221
uint16_t mI2cCommand;
244222
float mA;

0 commit comments

Comments
 (0)