I think the Sigma and threshold values are adjusted within the init function of VL53L1X.
The following code is in the init function of VL53L1X.cpp.
What criteria do you use to determine the Sigma and threshold values below?
Also, does changing that value have any effect on SigmaFail or Threshold fail in the measurement status?
// general config
writeReg16Bit(SYSTEM__THRESH_RATE_HIGH, 0x0000);
writeReg16Bit(SYSTEM__THRESH_RATE_LOW, 0x0000);
writeReg(DSS_CONFIG__APERTURE_ATTENUATION, 0x38);
// timing config
// most of these settings will be determined later by distance and timing
// budget configuration
writeReg16Bit(RANGE_CONFIG__SIGMA_THRESH, 360); // tuning parm default
writeReg16Bit(RANGE_CONFIG__MIN_COUNT_RATE_RTN_LIMIT_MCPS, 192); // tuning parm default
// dynamic config
writeReg(SYSTEM__GROUPED_PARAMETER_HOLD_0, 0x01);
writeReg(SYSTEM__GROUPED_PARAMETER_HOLD_1, 0x01);
writeReg(SD_CONFIG__QUANTIFIER, 2); // tuning parm default