Index: firmware/App/Modes/ModeTreatmentParams.c =================================================================== diff -u -r09e6cf9de34acf18f6e1138bf56ac0edb4821186 -r65d0f3fed34c836640f502d80a8aeb4e10ddf5ac --- firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision 09e6cf9de34acf18f6e1138bf56ac0edb4821186) +++ firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision 65d0f3fed34c836640f502d80a8aeb4e10ddf5ac) @@ -412,6 +412,9 @@ if ( TRUE == accepted ) { + // store the user set ultrafiltration volume in pre-treatment parameters setup, if it is validated, otherwise keep the initial 0.0 + origTreatmentParams.uFVolume_L = uFVolumeL; + U32 treatmentDuration = getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ); if ( treatmentDuration > 0 ) @@ -834,7 +837,36 @@ return result; } +/*********************************************************************//** + * @brief + * The getUltrafiltrationVolumeOriginal function gets the floating point value + * of the original set treatment parameter's ultrafiltration volume by user in + * Pre-Treatment mode. + * @details Inputs: none + * @details Outputs: origTreatmentParams.uFVolume_L + * @param none + * @return the original ultrafiltration volume value in liter + *************************************************************************/ +F32 getUltrafiltrationVolumeOriginal( void ) +{ + return origTreatmentParams.uFVolume_L; +} +/*********************************************************************//** + * @brief + * The getUltrafiltrationRateOriginal function gets the floating point value + * of the original ultrafiltration rate calculated by the set treatment parameter's + * ultrafiltration volume and treatment duration by user in Pre-Treatment mode. + * @details Inputs: origTreatmentParams.uFVolume_L, origTreatmentParams.treatmentDuration_min + * @details Outputs: none + * @param none + * @return the original ultrafiltration rate value in mL/min + *************************************************************************/ +F32 getUltrafiltrationRateOriginal( void ) +{ + return origTreatmentParams.uFVolume_L * ML_PER_LITER / origTreatmentParams.treatmentDuration_min; +} + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/