File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/components/i2c/drivers Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,16 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
64
64
WS_DEBUG_PRINTLN (" Failed to initialize VL53L4CX sensor!" );
65
65
return false ;
66
66
}
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) {
70
71
WS_DEBUG_PRINTLN (" Failed to set VL53L4CX timing budget!" );
71
72
return false ;
72
73
}
73
74
74
- if (_VL53L4CX->VL53L4CX_SetDistanceMode (VL53L4CX_DISTANCEMODE_LONG) != VL53L4CX_ERROR_NONE) {
75
+ if (_VL53L4CX->VL53L4CX_SetDistanceMode (VL53L4CX_DISTANCEMODE_LONG) !=
76
+ VL53L4CX_ERROR_NONE) {
75
77
WS_DEBUG_PRINTLN (" Failed to set VL53L4CX distance mode to long!" );
76
78
}
77
79
@@ -133,10 +135,11 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
133
135
delay (250 );
134
136
135
137
for (uint8_t retries = 0 ;
136
- (status = _VL53L4CX->VL53L4CX_GetMeasurementDataReady (&NewDataReady)) &&
138
+ (status =
139
+ _VL53L4CX->VL53L4CX_GetMeasurementDataReady (&NewDataReady)) &&
137
140
!NewDataReady && retries < 3 ;
138
141
retries++) {
139
- delay (300 );
142
+ delay (350 );
140
143
WS_DEBUG_PRINT (" ." );
141
144
}
142
145
WS_DEBUG_PRINTLN (" " );
You can’t perform that action at this time.
0 commit comments