Index: firmware/App/Services/AlarmMgmtDD.c =================================================================== diff -u -r0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/App/Services/AlarmMgmtDD.c (.../AlarmMgmtDD.c) (revision 0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d) +++ firmware/App/Services/AlarmMgmtDD.c (.../AlarmMgmtDD.c) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -43,7 +43,8 @@ // ********** private data ********** static U32 alarmInfoPublicationTimerCounter; ///< Used to schedule alarm information publication to CAN bus. -static BOOL isAFaultAlarmActive; ///< Boolean flag to indicate whether a DD fault alarm is active. +static BOOL isADDFaultAlarmActive; ///< Boolean flag to indicate whether a DD fault alarm is active. +static BOOL isAFPFaultAlarmActive; ///< Boolean flag to indicate whether a FP fault alarm is active. /// Interval (in task intervals) at which to publish alarm information to CAN bus. static OVERRIDE_U32_T alarmInfoPublishInterval = { ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, 0 }; @@ -64,7 +65,7 @@ void initAlarmMgmtDD( void ) { alarmInfoPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - isAFaultAlarmActive = FALSE; + isADDFaultAlarmActive = FALSE; // Initialize common alarm mgmt unit initAlarmMgmt(); @@ -110,7 +111,7 @@ if ( ( TRUE == props.alarmIsDDFault ) && ( ALM_SRC_DD == props.alarmSource ) ) { // There is a DD fault alarm. - isAFaultAlarmActive = TRUE; + isADDFaultAlarmActive = TRUE; if ( TRUE == isTransitionToFaultRequired() ) { @@ -121,8 +122,8 @@ } if ( ( TRUE == props.alarmIsDDFault ) && ( ALM_SRC_FP == props.alarmSource ) ) { - // There is a DD fault alarm cause by FP. - isAFaultAlarmActive = TRUE; + // There is a FP fault alarm. + isAFPFaultAlarmActive = TRUE; if ( TRUE == isTransitionToFaultRequired() ) { @@ -258,6 +259,7 @@ void clearAlarmConditionDD( ALARM_ID_T alarm ) { ALARM_T props = getAlarmProperties( alarm ); + // verify given alarm if ( ( alarm > ALARM_ID_NO_ALARM ) && ( alarm < NUM_OF_ALARM_IDS ) ) { @@ -279,19 +281,32 @@ /*********************************************************************//** * @brief - * The isDDFaultAlarmActive function determines whether a fault alarm is currently + * The isDDFaultAlarmActive function determines whether a DD fault alarm is currently * active. * @details \b Inputs: alarmStatus * @details \b Outputs: none * @return TRUE if any alarm is active, FALSE if not *************************************************************************/ BOOL isDDFaultAlarmActive( void ) { - return isAFaultAlarmActive; + return isADDFaultAlarmActive; } /*********************************************************************//** * @brief + * The isFPFaultAlarmActive function determines whether a FP fault alarm is currently + * active. + * @details \b Inputs: alarmStatus + * @details \b Outputs: none + * @return TRUE if any alarm is active, FALSE if not + *************************************************************************/ +BOOL isFPFaultAlarmActive( void ) +{ + return isAFPFaultAlarmActive; +} + +/*********************************************************************//** + * @brief * The publishAlarmInfo function publishes alarm information at the set * interval. * @details \b Inputs: @@ -326,14 +341,14 @@ void handleResendActiveAlarmsRequest( void ) { ALARM_T props; - U32 index; + U32 alarm; - for ( index = 0; index < NUM_OF_ALARM_IDS; index++ ) + for ( alarm = 0; alarm < NUM_OF_ALARM_IDS; alarm++ ) { - if ( TRUE == isAlarmActive( (ALARM_ID_T)index ) ) + if ( TRUE == isAlarmActive( (ALARM_ID_T)alarm ) ) { - props = getAlarmProperties( (ALARM_ID_T)index ); - broadcastAlarmTriggered( index, BLANK_ALARM_DATA, BLANK_ALARM_DATA, props.alarmSource ); + props = getAlarmProperties( (ALARM_ID_T)alarm ); + broadcastAlarmTriggered( alarm, BLANK_ALARM_DATA, BLANK_ALARM_DATA, props.alarmSource ); } } } @@ -431,7 +446,8 @@ for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) { props = getAlarmProperties( a ); - if ( TRUE == isAlarmActive( a ) && ( ALM_SRC_DD == props.alarmSource)) + + if ( TRUE == isAlarmActive( a ) && ( ALM_SRC_DD == props.alarmSource) ) { ALARM_NAME_DATA_T data; @@ -483,7 +499,8 @@ for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) { props = getAlarmProperties( a ); - if ( TRUE == isAlarmActive( a ) && ( ALM_SRC_FP == props.alarmSource)) + + if ( TRUE == isAlarmActive( a ) && ( ALM_SRC_FP == props.alarmSource) ) { ALARM_NAME_DATA_T data; Index: firmware/App/Services/AlarmMgmtDD.h =================================================================== diff -u -r0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/App/Services/AlarmMgmtDD.h (.../AlarmMgmtDD.h) (revision 0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d) +++ firmware/App/Services/AlarmMgmtDD.h (.../AlarmMgmtDD.h) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -55,6 +55,7 @@ void clearAlarmDD( ALARM_ID_T alarm ); void clearAlarmConditionDD( ALARM_ID_T alarm ); BOOL isDDFaultAlarmActive( void ); +BOOL isFPFaultAlarmActive( void ) void handleResendActiveAlarmsRequest( void ); void activateAlarm1Data( ALARM_ID_T alarm, ALARM_DATA_T alarmData ); Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r89f18a07a6d5837bf9b4559a69046e2b06f32c35 -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 89f18a07a6d5837bf9b4559a69046e2b06f32c35) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -145,7 +145,7 @@ SW_FAULT_ID_BLOOD_LEAK_INVALID_EMB_MODE_CMD_SELECTED = 114, SW_FAULT_ID_INVALID_FILTERED_CONDUCTIVITY_SENSOR_ID = 115, NUM_OF_SW_FAULT_IDS -} DD_FAULT_ID_T; +} DD_SW_FAULT_ID_T; typedef enum { @@ -276,7 +276,7 @@ FP_FAULT_ID_FP_INVALID_PERMEATE_TANK_STATE = 123, FP_FAULT_ID_FP_INVALID_INLET_PRESSURE_CHECK_STATE = 124, NUM_OF_FP_FAULT_IDS -} FP_FAULT_ID_T; +} FP_SW_FAULT_ID_T; /**@}*/ Index: firmware/App/Services/FPInterface.h =================================================================== diff -u -ra0c144ed9f72066d7a7b1d047b01fb76ca56d667 -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/App/Services/FPInterface.h (.../FPInterface.h) (revision a0c144ed9f72066d7a7b1d047b01fb76ca56d667) +++ firmware/App/Services/FPInterface.h (.../FPInterface.h) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -45,10 +45,6 @@ void setFPFlowRate( F32 fpFlow ); F32 getFPFlowRate( void ); -void setFPOpMode( U32 opMode, U32 subMode ); -FP_OP_MODE_T getFPOpMode( void ); -U32 getFPSubMode( void ); - /**@}*/ #endif Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -ra0c144ed9f72066d7a7b1d047b01fb76ca56d667 -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision a0c144ed9f72066d7a7b1d047b01fb76ca56d667) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -354,8 +354,6 @@ setTDDialysateFlowrate( startPreGenRequest.dialRate ); setTDTargetDialysateTemperature( startPreGenRequest.dialTemp ); setTDAcidAndBicarbType( startPreGenRequest.acidType, startPreGenRequest.bicarbType ); - - } else if ( DD_MODE_PREG == ddMode ) { Index: firmware/source/sys_main.c =================================================================== diff -u -r0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d -re01f6c0b94312dec30878967be9ffa3228e8773b --- firmware/source/sys_main.c (.../sys_main.c) (revision 0d45291a1e7fb3fbc67c9159766b99cf0ca6d57d) +++ firmware/source/sys_main.c (.../sys_main.c) (revision e01f6c0b94312dec30878967be9ffa3228e8773b) @@ -46,7 +46,6 @@ /* USER CODE END */ /* Include Files */ - #include "sys_common.h" /* USER CODE BEGIN (1) */