Index: firmware/App/Modes/ModeTreatmentParams.c =================================================================== diff -u -rabd0f05c634651fec6615c0f8cb75af166610cc3 -r8466e63f95f65a3ffb18c3af85ac99328e41167b --- firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision abd0f05c634651fec6615c0f8cb75af166610cc3) +++ firmware/App/Modes/ModeTreatmentParams.c (.../ModeTreatmentParams.c) (revision 8466e63f95f65a3ffb18c3af85ac99328e41167b) @@ -132,6 +132,8 @@ treatParamsRejected = FALSE; treatmentCancelled = FALSE; + setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, 0.0 ); + // Set user alarm recovery actions allowed in this mode setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); @@ -401,16 +403,13 @@ { BOOL accepted = FALSE; REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NONE; - F32 uFVolumeL = uFVolumeMl / (F32)ML_PER_LITER; + F32 uFVolumeL = uFVolumeMl / (F32)ML_PER_LITER; // Validate given UF volume accepted = setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, uFVolumeL ); - if ( FALSE == accepted ) + + if ( TRUE == accepted ) { - rejReason = REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE; - } - else - { U32 treatmentDuration = getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ); if ( treatmentDuration > 0 ) @@ -429,6 +428,10 @@ rejReason = REQUEST_REJECT_REASON_TREATMENT_TIME_LESS_THAN_MINIMUM; } } + else + { + rejReason = REQUEST_REJECT_REASON_UF_VOLUME_OUT_OF_RANGE; + } // Respond to set treatment parameters request message uFVolumeL = getTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME );