Fixed dynamic ADC threshold issue.