Index: sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp =================================================================== diff -u -r695e95aa2ec5e6e1c395567449ac0f671ecd61ed -r6581def57942b1c1ef56a2f2feb74559946517b9 --- sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 695e95aa2ec5e6e1c395567449ac0f671ecd61ed) +++ sources/view/hd/adjustment/VTreatmentAdjustmentSaline.cpp (.../VTreatmentAdjustmentSaline.cpp) (revision 6581def57942b1c1ef56a2f2feb74559946517b9) @@ -28,9 +28,7 @@ { adjustment_Accepted ( vData.mAccepted ); adjustment_Reason ( vData.mReason ); - target ( vData.mTarget ); - state ( vData.mState ); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** @@ -40,18 +38,25 @@ /*! * \brief View::VTreatmentAdjustmentSaline::doAdjustment * \details the invocable slot to adjust(start/stop) the treatment saline bolus state + * \param vStart - if true sets the requestedState to 1(SALINE_CMD_START) otherwise to 0(SALINE_CMD_STOP) */ -void View::VTreatmentAdjustmentSaline::doAdjustment() + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStart + * \details sends the start saline request + */ +void View::VTreatmentAdjustmentSaline::doStart() { - // if it's accepted or rejected we have the last/current state of saline - // so decide on last received/response state - // be careful the response enum (GuiSalineStates) is - // different than request enum (AdjustSalineRequestData) - if ( state() == GuiSalineStates::SALINE_BOLUS_STATE_IN_PROGRESS ) { - _data.requestedState = GuiSalineCommands::SALINE_CMD_STOP; - } - else { - _data.requestedState = GuiSalineCommands::SALINE_CMD_START; - } - emit didAdjustment(_data); // notify the controllers to do the adjustment + _data.requestedState = GuiSalineCommands::SALINE_CMD_START; + emit didAdjustment(_data); } + +/*! + * \brief View::VTreatmentAdjustmentSaline::doStop + * \details sends the stop saline request + */ +void View::VTreatmentAdjustmentSaline::doStop() +{ + _data.requestedState = GuiSalineCommands::SALINE_CMD_STOP; + emit didAdjustment(_data); +}