File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/components/i2c/drivers Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,19 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
68
68
return false ;
69
69
}
70
70
71
- // Set 1 second measurement time, the highest possible TimingBudget is 10s
72
- if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds (1000000 ) !=
71
+ if (_VL53L4CX->VL53L4CX_SetDistanceMode (VL53L4CX_DISTANCEMODE_LONG) !=
73
72
VL53L4CX_ERROR_NONE) {
74
- WS_DEBUG_PRINTLN (" Failed to set VL53L4CX timing budget !" );
73
+ WS_DEBUG_PRINTLN (" Failed to set VL53L4CX distance mode to long !" );
75
74
return false ;
76
75
}
77
76
78
- if (_VL53L4CX->VL53L4CX_SetDistanceMode (VL53L4CX_DISTANCEMODE_LONG) !=
77
+ // Set 1 second measurement time, the highest possible TimingBudget is 10s
78
+ if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds (1000000 ) !=
79
79
VL53L4CX_ERROR_NONE) {
80
- WS_DEBUG_PRINTLN (" Failed to set VL53L4CX distance mode to long !" );
80
+ WS_DEBUG_PRINTLN (" Failed to set VL53L4CX timing budget !" );
81
81
return false ;
82
82
}
83
-
83
+
84
84
if (_VL53L4CX->VL53L4CX_StartMeasurement () != VL53L4CX_ERROR_NONE) {
85
85
WS_DEBUG_PRINTLN (" Failed to start VL53L4CX ranging!" );
86
86
return false ;
You can’t perform that action at this time.
0 commit comments