Index: firmware/App/Controllers/DialysateFlow.c =================================================================== diff -u -r66c7171351e2f3e489008ace7ab18178b71e35ce -rce20c155091cd03f6ec01c0316a428b8b612492f --- firmware/App/Controllers/DialysateFlow.c (.../DialysateFlow.c) (revision 66c7171351e2f3e489008ace7ab18178b71e35ce) +++ firmware/App/Controllers/DialysateFlow.c (.../DialysateFlow.c) (revision ce20c155091cd03f6ec01c0316a428b8b612492f) @@ -78,8 +78,34 @@ /*********************************************************************//** * @brief + * The execDialysateFlowMeterSelfTest function executes the dialysate flow + * sensor's self-test. + * @details Inputs: none + * @details Outputs: none + * @return PressuresSelfTestResult (SELF_TEST_STATUS_T) + *************************************************************************/ +SELF_TEST_STATUS_T execDialysateFlowMeterSelfTest( void ) +{ + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; + + BOOL calStatus = processCalibrationData(); + + if ( TRUE == calStatus ) + { + result = SELF_TEST_STATUS_PASSED; + } + else + { + result = SELF_TEST_STATUS_FAILED; + } + + return result; +} + +/*********************************************************************//** + * @brief * The execDialysateFlowMeterMonitor function executes the Dialysate flow monitor. - * The Dialysate flow sensor is read, filtered, converted to L/min and calibrated (TODO). + * The Dialysate flow sensor is read, filtered, converted to L/min and calibrated. * @details Inputs: measuredFlowReadingsSum, flowFilterCounter, * measuredDialysateFlowRateLPM * @details Outputs: measuredFlowReadingsSum, flowFilterCounter, @@ -183,7 +209,8 @@ DIALYSATE_FLOW_METER_DATA_T dialysateFlowData; dialysateFlowData.measuredDialysateFlowRate = getMeasuredDialysateFlowRate(); - broadcastDialysateFlowData( &dialysateFlowData ); + broadcastData( MSG_ID_DG_DIALYSATE_FLOW_METER_DATA, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&dialysateFlowData, + sizeof( DIALYSATE_FLOW_METER_DATA_T ) ); dialysateFlowDataPublicationTimerCounter = 0; } }