Skip to content

Commit 8b59a83

Browse files
committed
VL53L4CX clang format
1 parent bd3e8e5 commit 8b59a83

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/components/i2c/drivers/WipperSnapper_I2C_Driver_VL53L4CX.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,16 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
6464
WS_DEBUG_PRINTLN("Failed to initialize VL53L4CX sensor!");
6565
return false;
6666
}
67-
68-
// Set 1 second measurement time, the highest possible TimingBudget is 10seconds
69-
if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds(1000000) != VL53L4CX_ERROR_NONE) {
67+
68+
// Set 1 second measurement time, the highest possible TimingBudget is 10s
69+
if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds(1000000) !=
70+
VL53L4CX_ERROR_NONE) {
7071
WS_DEBUG_PRINTLN("Failed to set VL53L4CX timing budget!");
7172
return false;
7273
}
7374

74-
if (_VL53L4CX->VL53L4CX_SetDistanceMode(VL53L4CX_DISTANCEMODE_LONG) != VL53L4CX_ERROR_NONE) {
75+
if (_VL53L4CX->VL53L4CX_SetDistanceMode(VL53L4CX_DISTANCEMODE_LONG) !=
76+
VL53L4CX_ERROR_NONE) {
7577
WS_DEBUG_PRINTLN("Failed to set VL53L4CX distance mode to long!");
7678
}
7779

@@ -133,10 +135,11 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
133135
delay(250);
134136

135137
for (uint8_t retries = 0;
136-
(status = _VL53L4CX->VL53L4CX_GetMeasurementDataReady(&NewDataReady)) &&
138+
(status =
139+
_VL53L4CX->VL53L4CX_GetMeasurementDataReady(&NewDataReady)) &&
137140
!NewDataReady && retries < 3;
138141
retries++) {
139-
delay(300);
142+
delay(350);
140143
WS_DEBUG_PRINT(" .");
141144
}
142145
WS_DEBUG_PRINTLN("");

0 commit comments

Comments
 (0)