Index: sources/drydemo/StateControllerTreatmentBroadcasts.cpp =================================================================== diff -u -rbf271a558491a83b39eb30748784f1b744736dd2 -r4624d7657d342248336c1ff16edfae614c335728 --- sources/drydemo/StateControllerTreatmentBroadcasts.cpp (.../StateControllerTreatmentBroadcasts.cpp) (revision bf271a558491a83b39eb30748784f1b744736dd2) +++ sources/drydemo/StateControllerTreatmentBroadcasts.cpp (.../StateControllerTreatmentBroadcasts.cpp) (revision 4624d7657d342248336c1ff16edfae614c335728) @@ -39,7 +39,7 @@ void StateController::handleTreatmentStatesBroadcastData(const Broadcast_Type BCType) { static quint32 broadcastCounter = 0; - if ((++broadcastCounter % NUN_OF_COUNTS_QART_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } + if ((++broadcastCounter % NUN_OF_COUNTS_QUICK_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } QVariantList msg; msg.append(static_cast(ID_TD_TREATMENT_STATE_DATA)); @@ -158,14 +158,16 @@ _isBroadcastListReady = true; } -void StateController::handleDDGenDialysateModeBroadcastData(const Broadcast_Type BCType) +void StateController::handleDDGenDialysateModeBroadcastData(const Broadcast_Type BCType, const bool isDialysateBypass) { static quint32 broadcastCounter = 15; if ((++broadcastCounter % NUM_OF_COUNTS_TIMER_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } quint32 dummyData = 1; float dummyFloat = 150.2; - quint32 dialBypass = (_treatmentSubStates.fluidBolusState == FLUID_BOLUS_SALINE_IN_PROGRESS_STATE ? BYPASS_DIALYSATE_DELIVER : ALLOW_DIALYSATE_DELIVER); + quint32 dialBypass = (_treatmentSubStates.fluidBolusState != FLUID_BOLUS_IDLE_STATE ? BYPASS_DIALYSATE_DELIVER : ALLOW_DIALYSATE_DELIVER); + // NOTE: when we go to treatment pause we should be in bypass while fluid bolus is still in idle so used this exception + if (isDialysateBypass) { dialBypass = BYPASS_DIALYSATE_DELIVER; } QVariantList msg; msg.append(static_cast(ID_DD_GEN_DIALYSATE_MODE_DATA));