Index: firmware/App/Modes/ModeGenDialysate.c =================================================================== diff -u -r5356f3f1bf66fa22aeb9e17b899a2be667865360 -r578aff808df7eba48388469ad6c52e5212de8266 --- firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 5356f3f1bf66fa22aeb9e17b899a2be667865360) +++ firmware/App/Modes/ModeGenDialysate.c (.../ModeGenDialysate.c) (revision 578aff808df7eba48388469ad6c52e5212de8266) @@ -905,6 +905,29 @@ /*********************************************************************//** * @brief + * The getBalancingChamberSwitchingActiveStatus function checks if the DD + * subsystem is in the Gen Dialysate Mode and if the state is either bypass or delivery + * to determine whether the balancing chamber switching is active. + * @details \b Inputs: Generation dialysate mode / state + * @details \b Outputs: flag for if Balancing Chamber Switching is active + * @return TRUE if balancing chamber switching is active, FALSE if not. + *************************************************************************/ +BOOL getBalancingChamberSwitchingActiveStatus( void ) +{ + BOOL status = FALSE; + + if ( ( DD_MODE_GEND == getCurrentOperationMode() ) && + ( ( DD_GEND_DIALYSATE_BYPASS_STATE == genDialysateState ) || + ( DD_GEND_DIALYSATE_DELIVERY_STATE == genDialysateState ) ) ) + { + status = TRUE; + } + + return status; +} + +/*********************************************************************//** + * @brief * The checkDialysateTemperature function checks the dialysate temperature * against the target temperature and alarm if temperature is out of range. * @details \b Inputs: targetTemp, dialysateTemp @@ -986,6 +1009,7 @@ data.d51Pressure = getFilteredPressure( D51_PRES ); data.isDialysateGoodtoDeliver = (BOOL)getDialGoodToDeliverStatus(); data.currentQd = dialysateToDialyzerFlowRate; + data.isBalancingChamberSwitchingActive = getBalancingChamberSwitchingActiveStatus(); broadcastData( MSG_ID_DD_GEN_DIALYSATE_MODE_DATA, COMM_BUFFER_OUT_CAN_DD_BROADCAST, (U08*)&data, sizeof( GEN_DIALYSATE_MODE_DATA_T ) );