Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -r9eae2f683887bededd2240f51ddfc667d8c1d566 -r4f85c7f9ea610584566e869723874bbeffd6b41e --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 9eae2f683887bededd2240f51ddfc667d8c1d566) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision 4f85c7f9ea610584566e869723874bbeffd6b41e) @@ -46,6 +46,7 @@ #define D28_D30_DATA_COLLECTION_TIME_MS ( 1 * MS_PER_SECOND ) ///< Dialysate temperature sensors data collection time in milliseconds. #define D28_D30_TEMP_SENSORS_MAX_DEVIATION_C 3.0F ///< Dialysate temperature sensors maximum allowed deviation in C. #define DIALYSATE_TEMP_SNSRS_OUT_OF_RANGE_TIMEOUT_MS ( 10 * MS_PER_SECOND ) ///< Dialysate temperature sensors drift timeout in milliseconds. +#define TEMP_SNSRS_FILTERING_SAMPLE_TIME_SEC 5.0F ///< Dialysate temperature sensors sample interval into moving average filter. #define D28_D30_TEMP_SENSORS_MAX_DEVIATION_IN_HEAT_DIS_C 5.0F ///< Dialysate temperature sensors maximum allowed deviation in heat disinfect in C. /// Dialysate temperature sensors enums @@ -450,9 +451,18 @@ *************************************************************************/ static void getTempMovingAverageTimeInterval( void ) { + DD_OP_MODE_T opMode = getCurrentOperationMode(); + U32 sampleInterval; F32 period = (F32)SEC_PER_MIN / ( getTDDialysateFlowrate() / BAL_CHAMBER_FILL_VOLUME_ML ) ; - U32 sampleInterval = (U32)( ( period / (F32)TEMP_MOVING_AVG_NUM_OF_SAMPLES ) * MS_PER_SECOND ); + if ( DD_MODE_HEAT == opMode ) + { + sampleInterval = (U32)( ( TEMP_SNSRS_FILTERING_SAMPLE_TIME_SEC / (F32)TEMP_MOVING_AVG_NUM_OF_SAMPLES ) * MS_PER_SECOND ); + } + else + { + sampleInterval = (U32)( ( period / (F32)TEMP_MOVING_AVG_NUM_OF_SAMPLES ) * MS_PER_SECOND ); + } tempDataCollectionTimeInterval = (U32) ( sampleInterval / TASK_PRIORITY_INTERVAL ); }