Add fast moving average filter for faster startup
This commit is contained in:
		@@ -38,6 +38,12 @@
 | 
			
		||||
 */
 | 
			
		||||
#define ADC_PT1000_FILTER_WEIGHT 0.005f
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
  * @brief Moving average filter weight used for fast regaulation. This is used when the measured resistance
 | 
			
		||||
  * is more than 20 Ohms away from the current averaged value.
 | 
			
		||||
  */
 | 
			
		||||
#define ADC_PT1000_FILTER_WEIGHT_FAST 0.05
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief ADC channel number of PT1000 sensor input
 | 
			
		||||
 */
 | 
			
		||||
@@ -99,6 +105,8 @@
 | 
			
		||||
 */
 | 
			
		||||
#define ADC_TO_RES(adc) ((float)(adc) / 4096.0f * 2500.0f)
 | 
			
		||||
 | 
			
		||||
#define RES_TO_ADC(res) ((float)(res) / 2500.0f * 4096.0f)
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @brief This function sets up the ADC measurement fo the external PT1000 temperature sensor
 | 
			
		||||
 *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user