src/vl53l1x.cpp
uint32_t Vl53l1x::getMeasurementTimingBudget()
{
  // assumes PresetMode is LOWPOWER_AUTONOMOUS and these sequence steps are
  // enabled: VHV, PHASECAL, DSS1, RANGE

  // VL53L1_get_timeouts_us() begin

  // "Update Macro Period for Range A VCSEL Period"
  uint32_t macro_period_us = calcMacroPeriod(readReg(RANGE_CONFIG__VCSEL_PERIOD_A));

  // "Get Range Timing A timeout"

  uint32_t range_config_timeout_us = timeoutMclksToMicroseconds(decodeTimeout(
    readReg16Bit(RANGE_CONFIG__TIMEOUT_MACROP_A)), macro_period_us);

  // VL53L1_get_timeouts_us() end

  return  2 * range_config_timeout_us + TimingGuard;
}
// Get the measurement timing budget in microseconds
// based on VL53L1_SetMeasurementTimingBudgetMicroSeconds()
Get the measurement timing budget in microseconds
based on VL53L1_SetMeasurementTimingBudgetMicroSeconds()
Get the measurement timing budget in microseconds based on VL53L1_SetMeasurementTimingBudgetMicroSeconds ()
uint32_t Vl53l1x::getMeasurementTimingBudget()
{
  uint32_t macro_period_us = calcMacroPeriod(readReg(RANGE_CONFIG__VCSEL_PERIOD_A));
  uint32_t range_config_timeout_us = timeoutMclksToMicroseconds(decodeTimeout(
    readReg16Bit(RANGE_CONFIG__TIMEOUT_MACROP_A)), macro_period_us);
  return  2 * range_config_timeout_us + TimingGuard;
}
uint32_t Vl53l1x :: getMeasurementTimingBudget ( ) { uint32_t macro_period_us = calcMacroPeriod ( readReg ( RANGE_CONFIG__VCSEL_PERIOD_A ) ) ; uint32_t range_config_timeout_us = timeoutMclksToMicroseconds ( decodeTimeout ( readReg16Bit ( RANGE_CONFIG__TIMEOUT_MACROP_A ) ) , macro_period_us ) ; return 2 * range_config_timeout_us + TimingGuard ; }
Get the measurement timing budget in microseconds
based on VL53L1_SetMeasurementTimingBudgetMicroSeconds()
Get the measurement timing budget in microseconds based on VL53L1_SetMeasurementTimingBudgetMicroSeconds ()
// assumes PresetMode is LOWPOWER_AUTONOMOUS and these sequence steps are // enabled: VHV, PHASECAL, DSS1, RANGE // VL53L1_get_timeouts_us() begin // "Update Macro Period for Range A VCSEL Period" // "Get Range Timing A timeout" // VL53L1_get_timeouts_us() end