Index: firmware/App/Services/DDInterface.c =================================================================== diff -u -rdb8ff28e816a37e033e36b76ab5949be78114125 -r959f16a2530e68b517cbb5c12c430d5aef4c5f9d --- firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision db8ff28e816a37e033e36b76ab5949be78114125) +++ firmware/App/Services/DDInterface.c (.../DDInterface.c) (revision 959f16a2530e68b517cbb5c12c430d5aef4c5f9d) @@ -36,7 +36,7 @@ // ********** private data ********** -// DG status +// DD status static DD_OP_MODE_T ddCurrentOpMode; ///< Current DD operation mode. static U32 ddSubMode; ///< Current state (sub-mode) of current DD operation mode. static F32 dialysatePressure; ///< Current dialysate pressure reported by DD. @@ -48,7 +48,7 @@ static DIALYSATE_DELIVERY_REQ_PAYLOAD_T dialysateDeliveryCmdSet; ///< Set of dialysate delivery parameters to send to the DD during treatment. -// DG command response +// DD command response static DD_CMD_RESPONSE_T ddCmdResp[ NUM_OF_DD_COMMANDS ]; ///< Keep the latest DD command response for each command. // ********** private function prototypes ********** @@ -111,26 +111,26 @@ /**********************************************************************//** * @brief - * The checkDGDataFreshness function checks the freshness of data coming from + * The checkDDDataFreshness function checks the freshness of data coming from * the DD sub-system. * @details \b Alarm: Given alarm is triggered if DD is communicating but has * not published new data for too long. * @details \b Inputs: DD communicating flag * @details \b Outputs: none * @param alarm ID of alarm to check - * @param dgFreshDataFlag Pointer to flag indicating whether new data has been + * @param ddFreshDataFlag Pointer to flag indicating whether new data has been * received since last time this function has seen it. * @return None *************************************************************************/ -static void checkDGDataFreshness( ALARM_ID_T alarmID, BOOL *dgFreshDataFlag ) +static void checkDDDataFreshness( ALARM_ID_T alarmID, BOOL *ddFreshDataFlag ) { - if ( TRUE == *dgFreshDataFlag ) + if ( TRUE == *ddFreshDataFlag ) { - *dgFreshDataFlag = FALSE; + *ddFreshDataFlag = FALSE; checkPersistentAlarm( alarmID, FALSE, 0.0, 0.0 ); } else - { // Alarm if not receiving DG fresh data message in timely manner + { // Alarm if not receiving DD fresh data message in timely manner if ( TRUE == isDDCommunicating() ) { checkPersistentAlarm( alarmID, TRUE, 0.0, 0.0 ); @@ -144,7 +144,7 @@ /*********************************************************************//** * @brief - * The execDGInterfaceMonitor function executes the DD Interface monitoring + * The execDDInterfaceMonitor function executes the DD Interface monitoring * function. Ensures DD is sending fresh data in a timely manner. * @details \b Inputs: ddOpModeDataFreshFlag * @details \b Outputs: ddOpModeDataFreshFlag @@ -181,7 +181,7 @@ /*********************************************************************//** * @brief - * The getDGSubMode function gets the latest reported DD operating sub-mode. + * The getDDSubMode function gets the latest reported DD operating sub-mode. * @details \b Inputs: ddSubMode * @details \b Outputs: none * @return Latest reported DD operating sub-mode. @@ -396,38 +396,6 @@ sendMessage( MSG_ID_DD_GEN_DIALYSATE_REQUEST_DATA, COMM_BUFFER_OUT_CAN_TD_2_DD, (U08*)(&dialysateDeliveryCmdSet), sizeof( DIALYSATE_DELIVERY_REQ_PAYLOAD_T ) ); } -/**********************************************************************//** - * @brief - * The checkDDDataFreshness function checks to verify that needed data from - * the DD sub-system is coming regularly to keep the data fresh. - * @details Alarm: Data freshness alarm triggered if fresh data not received - * within 2 seconds of last data broadcast. - * @details Inputs: none - * @details Outputs: ddFreshDataFlag set to FALSE - * @param alarm ID of alarm to check - * @param ddFreshDataFlag flag indicating whether data is fresh - * @return None - *************************************************************************/ -static void checkDDDataFreshness( ALARM_ID_T alarmID, BOOL *ddFreshDataFlag ) -{ - if ( TRUE == *ddFreshDataFlag ) - { - *ddFreshDataFlag = FALSE; - checkPersistentAlarm( alarmID, FALSE, 0.0, 0.0 ); - } - else - { // Alarm if not receiving DD fresh data message in timely manner - if ( TRUE == isDDCommunicating() ) - { - checkPersistentAlarm( alarmID, TRUE, 0.0, 0.0 ); - } - else - { - checkPersistentAlarm( alarmID, FALSE, 0.0, 0.0 ); - } - } -} - /*********************************************************************//** * @brief * The handleDDCommandResponse function processes the latest DD command response. @@ -514,8 +482,8 @@ // if ( TRUE == ddStarted ) // { -// if ( ( DG_MODE_FAUL != ddCurrentOpMode ) && ( DG_MODE_GEND != ddCurrentOpMode ) && -// ( DG_MODE_FILL != ddCurrentOpMode ) && ( DG_MODE_DRAI != ddCurrentOpMode ) ) +// if ( ( DD_MODE_FAUL != ddCurrentOpMode ) && ( DD_MODE_GEND != ddCurrentOpMode ) && +// ( DD_MODE_FILL != ddCurrentOpMode ) && ( DD_MODE_DRAI != ddCurrentOpMode ) ) // { // activateAlarmNoData( ALARM_ID_TD_DD_RESTARTED_FAULT ); // ddStarted = FALSE; // do not want to re-trigger alarm after alarm is cleared