Index: sources/drydemo/StateControllerTreatmentBroadcasts.cpp =================================================================== diff -u -r521f29cb7dcd0de352dd744292488380e07cb9e3 -re8edefcae8e47854198b06c1a65e4e45da5f3afc --- sources/drydemo/StateControllerTreatmentBroadcasts.cpp (.../StateControllerTreatmentBroadcasts.cpp) (revision 521f29cb7dcd0de352dd744292488380e07cb9e3) +++ sources/drydemo/StateControllerTreatmentBroadcasts.cpp (.../StateControllerTreatmentBroadcasts.cpp) (revision e8edefcae8e47854198b06c1a65e4e45da5f3afc) @@ -27,10 +27,12 @@ static quint32 broadcastCounter = 3; if ((++broadcastCounter % NUM_OF_COUNTS_TIMER_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } + quint32 localDialFlowMLPM = (_treatmentStatus.isDialysateInBypass ? 0 : dialFlowMLPM); + QVariantList msg; msg.append(static_cast(ID_TD_TREATMENT_SET_POINTS)); msg.append(Can_Id::eChlid_TD_Sync); - msg.append(bloodFlowMLPM); msg.append(dialFlowMLPM); msg.append(dialTempC); + msg.append(bloodFlowMLPM); msg.append(localDialFlowMLPM); msg.append(dialTempC); _isBroadcastListReady = false; _broadcastMessages.append(msg); _isBroadcastListReady = true; @@ -158,16 +160,16 @@ _isBroadcastListReady = true; } -void StateController::handleDDGenDialysateModeBroadcastData(const Broadcast_Type BCType, const bool isDialysateBypass) +void StateController::handleDDGenDialysateModeBroadcastData(const Broadcast_Type BCType) { 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_IDLE_STATE ? BYPASS_DIALYSATE_DELIVER : ALLOW_DIALYSATE_DELIVER); + quint32 dialBypass = ALLOW_DIALYSATE_DELIVER; //(_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; } + if (_treatmentStatus.isDialysateInBypass) { dialBypass = BYPASS_DIALYSATE_DELIVER; } QVariantList msg; msg.append(static_cast(ID_DD_GEN_DIALYSATE_MODE_DATA)); @@ -186,7 +188,7 @@ static quint32 broadcastCounter = 22; if ((++broadcastCounter % NUM_OF_COUNTS_TIMER_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } - float d27Cond = 250.63; + float d27Cond = 13.2; QVariantList msg; msg.append(static_cast(ID_DD_CONDUCTIVITY_DATA)); @@ -277,7 +279,7 @@ _isBroadcastListReady = true; } -void StateController::handleTreatmentPauseBroadcastData(const Broadcast_Type BCType) +void StateController::handleTreatmentPauseBroadcastData(const Broadcast_Type BCType, const bool zeroCounter) { static quint32 broadcastCounter = 90; if ((++broadcastCounter % NUM_OF_COUNTS_TIMER_BC_EMIT != 0) && (BCType == BC_DELAYED)) { return; } @@ -286,6 +288,9 @@ quint32 countdownMS = (_treatmentStatus.txPauseBloodSittingCounter >= MAX_TIME_BLOOD_SITTING ? 0 : (MAX_TIME_BLOOD_SITTING - _treatmentStatus.txPauseBloodSittingCounter) / (MILLISECONDS_PER_SECOND / QOBJECT_TIMER_TIMEOUT_MS)); + // Zero the counter to make sure they do not show up + if (zeroCounter) { timeoutMS = 0; countdownMS = 0; } + QVariantList msg; msg.append(static_cast(ID_TD_TREATMENT_PAUSED_TIMER_DATA)); msg.append(Can_Id::eChlid_TD_Sync);