Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r906cd60834949277874330f9726c3fdbf52e944c -re2cda12dfbedc1b491efff3d5f76dc6743974feb --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 906cd60834949277874330f9726c3fdbf52e944c) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision e2cda12dfbedc1b491efff3d5f76dc6743974feb) @@ -1067,6 +1067,7 @@ BOOL verifyTreatmentDurationSettingChange( U32 treatmentTime ) { BOOL result = FALSE; + BOOL isResp2UINeeded = TRUE; REQUEST_REJECT_REASON_CODE_T rejectReason = REQUEST_REJECT_REASON_NONE; HD_OP_MODE_T currMode = getCurrentOperationMode(); @@ -1092,23 +1093,30 @@ if ( ( TRUE == isTxTimeValid ) && ( dialVolume <= MAX_DIALYSATE_VOLUME_ML ) && ( TRUE == isUFRateValid ) ) { - GENERIC_CONFIRMATION_REQUEST_T genericConfRequest; - result = TRUE; - txDurationRequest.requestedTxDurationMins = treatmentTime; - txDurationRequest.newUFRateMLPM = newUFRateMLPM; - txDurationRequest.isUFRateConfInProgress = TRUE; + if ( presMaxUFVolumeML > 0.0F ) + { + GENERIC_CONFIRMATION_REQUEST_T genericConfRequest; - genericConfRequest.requestID = (U32)GENERIC_CONFIRM_ID_UF_RATE_CHANGE_IN_TX_DURATION_CHANGE; - genericConfRequest.requestType = (U32)GENERIC_CONFIRM_CMD_REQUEST_OPEN; - genericConfRequest.rejectReason = 0; - genericConfRequest.genericPayload1 = txDurationRequest.newUFRateMLPM; - genericConfRequest.genericPayload2 = 0.0F; - genericConfRequest.genericPayload3 = 0.0F; - genericConfRequest.genericPayload4 = 0.0F; + // Don't send the treatment duration change response to UI because we have UF volume so the UF rate changes and it needs the approval of the user + // If the UF volume in the treatment is 0 then send the response back to UI + isResp2UINeeded = FALSE; - sendConfirmationRequest( &genericConfRequest ); + txDurationRequest.requestedTxDurationMins = treatmentTime; + txDurationRequest.newUFRateMLPM = newUFRateMLPM; + txDurationRequest.isUFRateConfInProgress = TRUE; + + genericConfRequest.requestID = (U32)GENERIC_CONFIRM_ID_UF_RATE_CHANGE_IN_TX_DURATION_CHANGE; + genericConfRequest.requestType = (U32)GENERIC_CONFIRM_CMD_REQUEST_OPEN; + genericConfRequest.rejectReason = 0; + genericConfRequest.genericPayload1 = txDurationRequest.newUFRateMLPM; + genericConfRequest.genericPayload2 = 0.0F; + genericConfRequest.genericPayload3 = 0.0F; + genericConfRequest.genericPayload4 = 0.0F; + + sendConfirmationRequest( &genericConfRequest ); + } } else { @@ -1146,7 +1154,7 @@ } } - if ( rejectReason != REQUEST_REJECT_REASON_NONE ) + if ( TRUE == isResp2UINeeded ) { // Send response to request only if there is a rejection sendChangeTreatmentDurationResponse( result, rejectReason, presTreatmentTimeSecs / SEC_PER_MIN, presMaxUFVolumeML );