The VL53L1CB proximity sensor, based on ST’s FlightSense™, Time-of-Flight technology.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: VL53L1CB_noshield_1sensor_polls_auton VL53L1CB_noshield_1sensor_interrupt_auton X_NUCLEO_53L1A2
Based on VL53L1 library, this is a library for the VL53L1CB ToF chip.
Diff: src/vl53l1_hist_core.c
- Revision:
- 18:0696efe39d08
- Parent:
- 7:1add29d51e72
diff -r ca0ce4daf573 -r 0696efe39d08 src/vl53l1_hist_core.c --- a/src/vl53l1_hist_core.c Wed Jun 23 12:57:26 2021 +0000 +++ b/src/vl53l1_hist_core.c Wed Jul 21 17:06:38 2021 +0200 @@ -381,7 +381,9 @@ period = 2048 * (uint32_t)VL53L1_decode_vcsel_period(pdata1->VL53L1_p_009); - remapped_phase = (uint32_t)pdata2->zero_distance_phase % period; + if (period != 0) + remapped_phase = + (uint32_t)pdata2->zero_distance_phase % period; phase_delta = (int32_t)pdata1->zero_distance_phase