Skip to content

Commit fbaffeb

Browse files
author
j000bs
committed
Remove remnant from VL53 ToF sensor
Functions for changing the I2C speed are not required any more.
1 parent f5bca8c commit fbaffeb

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/OpenBikeSensorFirmware.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,6 @@ void handleButtonInServerMode();
106106
bool loadConfig(ObsConfig &cfg);
107107
void copyCollectedSensorData(DataSet *set);
108108

109-
// The BMP280 can keep up to 3.4MHz I2C speed, so no need for an individual slower speed
110-
void switch_wire_speed_to_VL53(){
111-
Wire.setClock(400000);
112-
}
113-
void switch_wire_speed_to_SSD1306(){
114-
Wire.setClock(500000);
115-
}
116-
117109
void setupSensors() {
118110
sensorManager = new HCSR04SensorManager;
119111

@@ -211,15 +203,14 @@ void setup() {
211203
// Setup display
212204
//##############################################################
213205
Wire.begin();
206+
Wire.setClock(500000);
214207
Wire.beginTransmission(displayAddress);
215208
byte displayError = Wire.endTransmission();
216209
if (displayError != 0) {
217210
Serial.println("Display not found");
218211
}
219212
obsDisplay = new SSD1306DisplayDevice;
220213

221-
switch_wire_speed_to_SSD1306();
222-
223214
obsDisplay->showLogo(true);
224215
obsDisplay->showTextOnGrid(2, obsDisplay->startLine(), OBSVersion);
225216

0 commit comments

Comments
 (0)