Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r206e45dff167966b800a628d1708f74e597f1772 -r45627442c3b93ec57ed18cd0943eed2662fb2dbc --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 206e45dff167966b800a628d1708f74e597f1772) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 45627442c3b93ec57ed18cd0943eed2662fb2dbc) @@ -27,6 +27,7 @@ #include "ModeTreatment.h" #include "NVDataMgmt.h" #include "OperationModes.h" +#include "PersistentAlarm.h" #include "PIControllers.h" #include "SafetyShutdown.h" #include "SystemCommMessages.h" @@ -935,13 +936,19 @@ { MOTOR_DIR_T dopMCDir, dopDir; U08 dirErrorCnt = getFPGADialOutPumpHallSensorStatus() & PUMP_DIR_ERROR_COUNT_MASK; + BOOL isHallSensorFailed = ( lastDialOutPumpDirectionCount != dirErrorCnt ? TRUE : FALSE ); // Check pump direction error count - if ( lastDialOutPumpDirectionCount != dirErrorCnt ) + if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_PUMP_DIRECTION_STATUS_ERROR, isHallSensorFailed ) ) { - lastDialOutPumpDirectionCount = dirErrorCnt; - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_PUMP_DIRECTION_STATUS_ERROR, (U32)HD_PUMP_DIALYSATE_OUTLET_PUMP ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_PUMP_DIRECTION_STATUS_ERROR, (U32)HD_PUMP_DIALYSATE_OUTLET_PUMP ) + } } + lastDialOutPumpDirectionCount = dirErrorCnt; dopMCDir = ( getMeasuredDialOutPumpMCSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); dopDir = ( getMeasuredDialOutPumpSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE );