Skip to content

Commit 2a4660a

Browse files
committed
Remove unnecessary overloads
1 parent 2088a89 commit 2a4660a

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

src/SparkFun_VL53L1X.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,6 @@ SFEVL53L1X::SFEVL53L1X()
4040
_interruptPin = -1;
4141
_device = new VL53L1X(&Wire, -1, -1);
4242
}
43-
SFEVL53L1X::SFEVL53L1X(TwoWire &i2cPort)
44-
{
45-
_i2cPort = &i2cPort;
46-
_shutdownPin = -1;
47-
_interruptPin = -1;
48-
_device = new VL53L1X(&i2cPort, -1, -1);
49-
}
50-
SFEVL53L1X::SFEVL53L1X(TwoWire &i2cPort, int shutdownPin)
51-
{
52-
_i2cPort = &i2cPort;
53-
_shutdownPin = shutdownPin;
54-
_interruptPin = -1;
55-
_device = new VL53L1X(&i2cPort, shutdownPin, -1);
56-
}
5743
SFEVL53L1X::SFEVL53L1X(TwoWire &i2cPort, int shutdownPin, int interruptPin)
5844
{
5945
_i2cPort = &i2cPort;

src/SparkFun_VL53L1X.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,7 @@ class SFEVL53L1X
6161
public:
6262
//Constructs our Distance sensor
6363
SFEVL53L1X(); // Default to Wire. Set both pins to -1 (undefined).
64-
SFEVL53L1X(TwoWire &i2cPort); // Set both pins to -1 (undefined).
65-
SFEVL53L1X(TwoWire &i2cPort, int shutdownPin); // Set interrupt pin to -1 (undefined).
66-
SFEVL53L1X(TwoWire &i2cPort, int shutdownPin, int interruptPin);
64+
SFEVL53L1X(TwoWire &i2cPort, int shutdownPin = -1, int interruptPin = -1);
6765
bool init(); //Deprecated version of begin
6866
bool begin(); //Initialization of sensor
6967
bool begin(TwoWire &i2cPort); //Initialization of sensor

0 commit comments

Comments
 (0)