LPC1768: Increase ADC median filter from 3 values to 23
Clarify the HAL_adc_get_result method to make sure correct values enter the filters HAL: Fix the PID control loop for non-AVR platforms
This commit is contained in:
@ -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 )
|
||||
|
Reference in New Issue
Block a user