Open Hainer1 opened 1 month ago
Thanks for reporting, I had performed basic testing on the code port when it was created earlier this year but must not have covered that case. I was working on 2 other ST TOF sensors for a client project and decided to do a conversion of the 4CD for my own use in the same time frame. I have not got around to my project for the VL53L4CD yet... maybe late this year.
My project for the VL53L4CD however will be on a system with a Nordic nRF9151, so this library will not likely be maintained for the ESP32.
I am using ESP-IDF5.3.1 with an ESP32S3WROOM1N8R2 and TOF VL53L4CD.@ 400000Hz
During TOF initialisation I set the timings to:
VL53L4CD_SetRangeTiming(i2c_address,
10,0);
After a delay of about 50ms, I read back the values with:
VL53L4CD_GetRangeTiming(i2c_address, &timing_budget_ms, &inter_measurement_ms); ESP_LOGI(TAG, "Ausgelesen: Range Timing Budget: %lu ms, Inter-Measurement Period: %lu ms", timing_budget_ms, inter_measurement_ms); ESP_LOGI(TAG, "Ausgelesen: Range Timing Budget: %" PRIu32 " ms, Inter-Measurement Period: %" PRIu32 " ms", timing_budget_ms, inter_measurement_ms);
The result is: I (2309) VL53L4CD_API: Sensor runs in autonomous mode I (2319) DISTANCE SENSOR: Ausgelesen: Range Timing Budget: 19 ms, Inter-Measurement Period: 101 ms I (2329) DISTANCE SENSOR: Ausgelesen: Range Timing Budget: 19 ms, Inter-Measurement Period: 101 ms
I have also added a print output to the API that indicates whether the mode is autonomous or continuous. I expect continuous, so I configure inter_measurement to 0, but I only get I (2309) VL53L4CD_API: Sensor is running in autonomous mode. Here is my customisation in the API: `VL53L4CD_Error VL53L4CD_StartRanging( Dev_t dev) { VL53L4CD_Error status = VL53L4CD_ERROR_NONE; uint32_t tmp;
}`