Skip to content

Commit 3a6f355

Browse files
authored
Merge pull request #1 from eldon/fixing-changeaddr
Updates instance address on changeAddress
2 parents aa4e1cf + 9e2df6e commit 3a6f355

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SparkFun_VL6180X.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ uint8_t VL6180x::changeAddress(uint8_t old_address, uint8_t new_address){
130130
if( new_address > 127) return old_address;
131131

132132
VL6180x_setRegister(VL6180X_I2C_SLAVE_DEVICE_ADDRESS, new_address);
133-
133+
_i2caddress = new_address;
134134
return VL6180x_getRegister(VL6180X_I2C_SLAVE_DEVICE_ADDRESS);
135135
}
136136

0 commit comments

Comments
 (0)