Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r1aa06c27877a9054c0655ada917a08016a60f8ef -rd23f94b810d65dd54809b0bfeb32f0f763051d4d --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 1aa06c27877a9054c0655ada917a08016a60f8ef) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision d23f94b810d65dd54809b0bfeb32f0f763051d4d) @@ -49,7 +49,7 @@ #define DIALYSATE_TEMP_LOW_SAFETY_LIMIT_C 42.0F ///< Dialysate low safety temperature limit in C. #define DIALYSATE_TEMP_LOW_SAFETY_TIMEOUT_MS ( 10 * MS_PER_SECOND ) ///< Dialysate temperature low safety timeout in milliseconds. #define DG_DATA_FRESHNESS_TIMEOUT_MS ( 3 * MS_PER_SECOND ) ///< DG data freshness timeout (in ms). -#define DIALYSATE_FLOW_FRESHNESS_TIMEOUT_MS ( 300 * MS_PER_SECOND ) ///< Dialysate flow freshness timeout (in ms). // DN-31OCT2022 +#define DIALYSATE_FLOW_FRESHNESS_TIMEOUT_MS ( 60 * MS_PER_SECOND ) ///< Dialysate flow freshness timeout (in ms). // DN-31OCT2022 // ********** private data ********** Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rc45f78c0ff3b0a866b7f6233092a2e611e801460 -rd23f94b810d65dd54809b0bfeb32f0f763051d4d --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision c45f78c0ff3b0a866b7f6233092a2e611e801460) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision d23f94b810d65dd54809b0bfeb32f0f763051d4d) @@ -784,8 +784,9 @@ *************************************************************************/ static F32 calcDialInFlow( void ) { - F32 estimatedFlow; - F32 QdTarget = getTargetDialInFlowRate(); + F32 estimatedFlow; + F32 QdTarget = getTargetDialInFlowRate(); + F32 deltaFlow; if (QdTarget >= DIAL_IN_FLOW_QHIGHTRANSITION) { @@ -815,17 +816,22 @@ } // Check the measured flow against estimated flow - / - F32 deltaFlow = 0.5 * estimatedFlow; // 50% estimated flow + deltaFlow = 0.5 * estimatedFlow; // 50% estimated flow //if ( deltaFlow < fabs( estimatedFlow - filteredDialInFlowMeterReading ) ) //{ // SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, filteredDialInFlowMeterReading, estimatedFlow ); //} - - // Check measured rotor speed vs. measured motor speed while controlling to target - if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, deltaFlow < fabs( estimatedFlow - filteredDialInFlowMeterReading ) ) ) ) + if ( TRUE == isDialInPumpRunning() ) { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, filteredDialInFlowMeterReading, estimatedFlow ); + if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, deltaFlow < fabs( estimatedFlow - filteredDialInFlowMeterReading ) ) ) ) // DN-31OCT2022 + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, filteredDialInFlowMeterReading, estimatedFlow ); + } } + else + { + isPersistentAlarmTriggered( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, FALSE ); + } return estimatedFlow; }