src/vl53l1x.cpp
void Vl53l1x::setupManualCalibration()
{
  // "save original vhv configs"
  saved_vhv_init = readReg(VHV_CONFIG__INIT);
  saved_vhv_timeout = readReg(VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND);

  // "disable VHV init"
  writeReg(VHV_CONFIG__INIT, saved_vhv_init & 0x7F);

  // "set loop bound to tuning param"
  writeReg(VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND,
    (saved_vhv_timeout & 0x03) + (3 << 2)); // tuning parm default (LOWPOWERAUTO_VHV_LOOP_BOUND_DEFAULT)

  // "override phasecal"
  writeReg(PHASECAL_CONFIG__OVERRIDE, 0x01);
  writeReg(CAL_CONFIG__VCSEL_START, readReg(PHASECAL_RESULT__VCSEL_START));
}
// "Setup ranges after the first one in low power auto mode by turning off
// FW calibration steps and programming static values"
// based on VL53L1_low_power_auto_setup_manual_calibration()
"Setup ranges after the first one in low power auto mode by turning off
FW calibration steps and programming static values"
based on VL53L1_low_power_auto_setup_manual_calibration()
" Setup ranges after the first one in low power auto mode by turning off FW calibration steps and programming static values " based on VL53L1_low_power_auto_setup_manual_calibration ()
void Vl53l1x::setupManualCalibration()
{
  saved_vhv_init = readReg(VHV_CONFIG__INIT);
  saved_vhv_timeout = readReg(VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND);
  writeReg(VHV_CONFIG__INIT, saved_vhv_init & 0x7F);
  writeReg(VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND,
    (saved_vhv_timeout & 0x03) + (3 << 2)); 
  writeReg(PHASECAL_CONFIG__OVERRIDE, 0x01);
  writeReg(CAL_CONFIG__VCSEL_START, readReg(PHASECAL_RESULT__VCSEL_START));
}
void Vl53l1x :: setupManualCalibration ( ) { saved_vhv_init = readReg ( VHV_CONFIG__INIT ) ; saved_vhv_timeout = readReg ( VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND ) ; writeReg ( VHV_CONFIG__INIT , saved_vhv_init & 0x7F ) ; writeReg ( VHV_CONFIG__TIMEOUT_MACROP_LOOP_BOUND , ( saved_vhv_timeout & 0x03 ) + ( 3 << 2 ) ) ; writeReg ( PHASECAL_CONFIG__OVERRIDE , 0x01 ) ; writeReg ( CAL_CONFIG__VCSEL_START , readReg ( PHASECAL_RESULT__VCSEL_START ) ) ; }
"Setup ranges after the first one in low power auto mode by turning off
FW calibration steps and programming static values"
based on VL53L1_low_power_auto_setup_manual_calibration()
" Setup ranges after the first one in low power auto mode by turning off FW calibration steps and programming static values " based on VL53L1_low_power_auto_setup_manual_calibration ()
// "save original vhv configs" // "disable VHV init" // "set loop bound to tuning param" // tuning parm default (LOWPOWERAUTO_VHV_LOOP_BOUND_DEFAULT) // "override phasecal"