Merge pull request #8996 from p3p/pr_bf2_more_adc_filter

[2.0.x] PID control fix and more LPC1768 ADC filtering
This commit is contained in:
Scott Lahteine
2018-01-15 05:14:25 -06:00
committed by GitHub
3 changed files with 117 additions and 37 deletions

View File

@ -90,7 +90,7 @@ enum ADCSensorState {
#if HAS_PID_HEATING
#define PID_K2 (1.0-PID_K1)
#define PID_dT ((OVERSAMPLENR * float(ACTUAL_ADC_SAMPLES)) / (F_CPU / 64.0 / 256.0))
#define PID_dT ((OVERSAMPLENR * float(ACTUAL_ADC_SAMPLES)) / TEMP_TIMER_FREQUENCY)
// Apply the scale factors to the PID values
#define scalePID_i(i) ( (i) * PID_dT )