File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/components/i2c/drivers Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 19
19
#include < vl53l4cx_class.h>
20
20
#include < vl53l4cx_def.h>
21
21
22
- #define VL53_SHUTDOWN_PIN -1 // /< Shutdown pin for VL53L4CX sensor
23
- #define VL53_READING_DELAY 250 // /< Delay for reading data attempts
22
+ #define VL53_SHUTDOWN_PIN -1 // /< Shutdown pin for VL53L4CX sensor
23
+ #define VL53_READING_DELAY 250 // /< Delay for reading data attempts
24
+ #define VL53_TIMING_BUDGET_NS 200000 // /< Timing budget for VL53L4CX sensor
24
25
25
26
/* *************************************************************************/
26
27
/* !
@@ -75,8 +76,8 @@ class WipperSnapper_I2C_Driver_VL53L4CX : public WipperSnapper_I2C_Driver {
75
76
}
76
77
77
78
// Set 200ms measurement time, the possible TimingBudget is 8-200ms
78
- if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds (200000 ) !=
79
- VL53L4CX_ERROR_NONE) {
79
+ if (_VL53L4CX->VL53L4CX_SetMeasurementTimingBudgetMicroSeconds (
80
+ VL53_TIMING_BUDGET_NS) != VL53L4CX_ERROR_NONE) {
80
81
WS_DEBUG_PRINTLN (" Failed to set VL53L4CX timing budget!" );
81
82
return false ;
82
83
}
You can’t perform that action at this time.
0 commit comments