用的光流模块里集成的是VL53L1X激光测距传感器,目前在学习官方的开源飞控。自己测试光流模块中的激光传感器时,发现能读取到VL53L1X的正确地址,但是不能测距离。如图中status = VL53L1_GetMeasurementDataReady(&dev, &isDataReady)这里读到的isDataReady一直都是0是怎么回事,初始化激光测距就是按照开源的代码写的。有没有哪位知道是怎么回事的,很困扰!!!
int vl53l1xSetParam(void) /*设置vl53l1x 参数*/
{
int status;
status = VL53L1_WaitDeviceBooted(&dev);
status = VL53L1_DataInit(&dev);
status = VL53L1_StaticInit(&dev);
status = VL53L1_SetDistanceMode(&dev, VL53L1_DISTANCEMODE_LONG);
status = VL53L1_SetMeasurementTimingBudgetMicroSeconds(&dev, 45000);
status = VL53L1_SetInterMeasurementPeriodMilliSeconds(&dev, 50);
status = VL53L1_StopMeasurement(&dev);
status = VL53L1_StartMeasurement(&dev);