Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rd8f35c0a4a1f998521ec2afd4b6589d1fad16897 -r1eace9b1363891153755e53ff3749445bd6fbc7c --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision d8f35c0a4a1f998521ec2afd4b6589d1fad16897) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 1eace9b1363891153755e53ff3749445bd6fbc7c) @@ -67,14 +67,13 @@ #define DIP_MAX_FLOW_RATE 1320.0F ///< Maximum measured BP flow rate allowed. #define DIP_MIN_FLOW_RATE -1320.0F ///< Minimum measured BP flow rate allowed. -#define DIP_MAX_FLOW_VS_SPEED_DIFF_RPM 350.0F ///< Maximum difference between measured motor speed and speed implied by measured flow. #define DIP_MAX_MOTOR_SPEED_WHILE_OFF_RPM 100.0F ///< Maximum motor speed (RPM) while motor is commanded off. #define DIP_MAX_ROTOR_VS_MOTOR_DIFF_RPM 2.0F ///< Maximum difference in speed between motor and rotor (in rotor RPM). #define DIP_MAX_MOTOR_SPEED_ERROR_RPM 300.0F ///< Maximum difference in speed between measured and commanded RPM. #define DIP_MAX_MOTOR_SPEED_VS_TRGT_DIFF_PCT 0.15F ///< Maximum motor speed vs target difference in percent. -/// Persist time (task intervals) for flow vs. motor speed error condition. -static const U32 DIP_FLOW_VS_SPEED_PERSIST = ((5 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); +/// Persist time (task intervals) for unexpected flow check failure condition. +static const U32 DIP_UNEXP_FLOW_CHK_PERSIST = ((5 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); /// Persist time (task intervals) for motor off error condition. static const U32 DIP_OFF_ERROR_PERSIST = ((5 * MS_PER_SECOND) / TASK_PRIORITY_INTERVAL); /// Persist time (task intervals) motor speed error condition. @@ -202,7 +201,6 @@ static U32 dipMotorSpeedCalcIdx = 0; ///< Index into 1 second buffer of motor speed hall sensor counts static U32 dipMotorSpeedCalcTimerCtr = 0; ///< Counter determines interval for calculating dialysate inlet pump motor speed from hall sensor count. -static U32 errorDialInFlowVsMotorSpeedPersistTimerCtr = 0; ///< Persistence timer counter for flow vs. motor speed error condition. static U32 errorDialInMotorOffPersistTimerCtr = 0; ///< Persistence timer counter for motor off check error condition. static U32 errorDialInMotorSpeedPersistTimerCtr = 0; ///< Persistence timer counter for motor speed error condition. static U32 errorDialInRotorSpeedPersistTimerCtr = 0; ///< Persistence timer counter for rotor speed error condition. @@ -277,7 +275,7 @@ // Initialize persistent alarm for flow sensor signal strength too low initPersistentAlarm( ALARM_ID_HD_DIAL_IN_FLOW_OUT_OF_RANGE, 0, DIP_MAX_FLOW_RATE_OUT_OF_RANGE_PERSIST ); - initPersistentAlarm( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, DIP_FLOW_VS_SPEED_PERSIST, DIP_FLOW_VS_SPEED_PERSIST ); + initPersistentAlarm( ALARM_ID_HD_DIAL_IN_FLOW_CHECK_FAILURE, DIP_UNEXP_FLOW_CHK_PERSIST, DIP_UNEXP_FLOW_CHK_PERSIST ); initTimeWindowedCount( TIME_WINDOWED_COUNT_DIP_COMMUTATION_ERROR, DIP_COMMUTATION_ERROR_MAX_CNT, DIP_COMMUTATION_ERROR_TIME_WIN_MS ); } @@ -1402,36 +1400,6 @@ } } - // Check only performed while in treatment mode and while we are in control to target state - if ( ( MODE_TREA == getCurrentOperationMode() ) && ( DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE == dialInPumpState ) ) - { - F32 tgt = (F32)targetDialInFlowRate; - F32 speed = getMeasuredDialInPumpSpeed(); - F32 impliedSpeed = dialysateInPumpRPMFromTargetFlowRate( tgt ); - F32 delta = fabs( speed - impliedSpeed ); - - if ( delta > DIP_MAX_FLOW_VS_SPEED_DIFF_RPM ) - { - if ( ++errorDialInFlowVsMotorSpeedPersistTimerCtr >= DIP_FLOW_VS_SPEED_PERSIST ) - { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_IN_PUMP_FLOW_VS_MOTOR_SPEED_CHECK, speed, impliedSpeed ); - } - } - } - else - { - errorDialInFlowVsMotorSpeedPersistTimerCtr = 0; - } - } - else - { - errorDialInFlowVsMotorSpeedPersistTimerCtr = 0; - } - // Check DG Dialysate flow rate /* TODO: Temporarily comment this out. Will restore it when know better how to handle this alarm. if ( ( TRUE == isDialInPumpRunning() ) && ( dialInPumpControlMode != PUMP_CONTROL_MODE_OPEN_LOOP ) )