Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r56ae47b6766bed3f138fa3f1989431d7a439ea7a -r3eb378de95b514ceb487e35342f58e734ca678c6 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 56ae47b6766bed3f138fa3f1989431d7a439ea7a) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 3eb378de95b514ceb487e35342f58e734ca678c6) @@ -1027,6 +1027,14 @@ clearAlarm( ALARM_ID_DG_TURN_OFF_INLET_WATER_VALVES ); clearCurrentCleaningModeStatus(); } + else + { + // If we are in the cleaning modes and the corresponding placeholder alarm is not active, reactivate it. + if ( FALSE == isAlarmActive( currentDGCleaningMode.alarmID ) ) + { + activateAlarmNoData( currentDGCleaningMode.alarmID ); + } + } return state; } Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r56ae47b6766bed3f138fa3f1989431d7a439ea7a -r3eb378de95b514ceb487e35342f58e734ca678c6 --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 56ae47b6766bed3f138fa3f1989431d7a439ea7a) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 3eb378de95b514ceb487e35342f58e734ca678c6) @@ -81,6 +81,7 @@ { U32 requestedTxDurationMins; ///< Requested treatment duration from the user in minutes. F32 newUFRateMLPM; ///< New calculated UF rate in mL/Min. + BOOL isUFRateConfInProgress; ///< Boolean flag to indicate whether a new UF rate confirmation has been requested. } TREATMENT_DURATION_RQST_T; // ********** private data ********** @@ -211,6 +212,7 @@ txDurationRequest.requestedTxDurationMins = 0; txDurationRequest.newUFRateMLPM = 0.0F; + txDurationRequest.isUFRateConfInProgress = FALSE; // reset dialysate temperature alarm persistences prior to starting a treatment. resetPersistentAlarmTimer( ALARM_ID_HD_DIALYSATE_TEMP_ABOVE_SAFETY_TEMP ); @@ -1101,6 +1103,7 @@ // Store the proposed treatment duration and the calculated new UF rate until the user approves it 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; @@ -1575,31 +1578,35 @@ BOOL result = FALSE; CONFIRMATION_REQUEST_STATUS_T status = getConfirmationRequestStatus( GENERIC_CONFIRM_ID_UF_RATE_CHANGE_IN_TX_DURATION_CHANGE ); - if ( ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) || ( CONFIRMATION_REQUEST_STATUS_REJECTED == status ) ) + if ( TRUE == txDurationRequest.isUFRateConfInProgress ) { - if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) + if ( ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) || ( CONFIRMATION_REQUEST_STATUS_REJECTED == status ) ) { - result = TRUE; - sendTreatmentLogEventData( TREATMENT_DURATION_CHANGE_EVENT, ( presTreatmentTimeSecs / SEC_PER_MIN ), txDurationRequest.requestedTxDurationMins ); - presTreatmentTimeSecs = txDurationRequest.requestedTxDurationMins * SEC_PER_MIN; - presUFRate = txDurationRequest.newUFRateMLPM; - setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, ( presMaxUFVolumeML / (F32)ML_PER_LITER ) ); - setTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION, ( presTreatmentTimeSecs / SEC_PER_MIN ) ); - setDialysisDialInFlowAndUFRate( getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), presMaxUFVolumeML, presUFRate ); - signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); - } + if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) + { + result = TRUE; + sendTreatmentLogEventData( TREATMENT_DURATION_CHANGE_EVENT, ( presTreatmentTimeSecs / SEC_PER_MIN ), txDurationRequest.requestedTxDurationMins ); + presTreatmentTimeSecs = txDurationRequest.requestedTxDurationMins * SEC_PER_MIN; + presUFRate = txDurationRequest.newUFRateMLPM; + setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, ( presMaxUFVolumeML / (F32)ML_PER_LITER ) ); + setTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION, ( presTreatmentTimeSecs / SEC_PER_MIN ) ); + setDialysisDialInFlowAndUFRate( getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), presMaxUFVolumeML, presUFRate ); + signalInitiatePressureStabilization( USE_NORMAL_STABILIZATION_PERIOD ); + } - // Regardless of accept or reject there is no reject reason. - sendChangeTreatmentDurationResponse( result, 0, ( presTreatmentTimeSecs / SEC_PER_MIN ), presMaxUFVolumeML ); - // Send new ranges for settings - treatmentParamsRangesBroadcastTimerCtr = getU32OverrideValue( &treatmentParamRangesPublishInterval ); - broadcastTreatmentSettingsRanges(); - // Send time/state data immediately for UI update - broadcastTreatmentTimeAndState(); + // Regardless of accept or reject there is no reject reason. + sendChangeTreatmentDurationResponse( result, 0, ( presTreatmentTimeSecs / SEC_PER_MIN ), presMaxUFVolumeML ); + // Send new ranges for settings + treatmentParamsRangesBroadcastTimerCtr = getU32OverrideValue( &treatmentParamRangesPublishInterval ); + broadcastTreatmentSettingsRanges(); + // Send time/state data immediately for UI update + broadcastTreatmentTimeAndState(); - // Done with treatment duration changes whether they were accepted or rejected. - txDurationRequest.newUFRateMLPM = 0.0F; - txDurationRequest.requestedTxDurationMins = 0; + // Done with treatment duration changes whether they were accepted or rejected. + txDurationRequest.newUFRateMLPM = 0.0F; + txDurationRequest.requestedTxDurationMins = 0; + txDurationRequest.isUFRateConfInProgress = FALSE; + } } } Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r56ae47b6766bed3f138fa3f1989431d7a439ea7a -r3eb378de95b514ceb487e35342f58e734ca678c6 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 56ae47b6766bed3f138fa3f1989431d7a439ea7a) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 3eb378de95b514ceb487e35342f58e734ca678c6) @@ -142,6 +142,8 @@ U32 priorSubState = currentSubState; U32 prior4thLevelState = current4thLevelState; + handleUFRateConfirmationMessageFromUI(); + // Any new mode requests? newMode = arbitrateModeRequest(); // Will return current mode if no pending requests Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r56ae47b6766bed3f138fa3f1989431d7a439ea7a -r3eb378de95b514ceb487e35342f58e734ca678c6 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 56ae47b6766bed3f138fa3f1989431d7a439ea7a) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 3eb378de95b514ceb487e35342f58e734ca678c6) @@ -3492,14 +3492,6 @@ if ( ( CONFIRMATION_REQUEST_STATUS_REJECTED == status ) || ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) ) { setConfirmationRequestStatus( (GENERIC_CONFIRM_ID_T)request_id, (CONFIRMATION_REQUEST_STATUS_T)status ); - - if ( GENERIC_CONFIRM_ID_UF_RATE_CHANGE_IN_TX_DURATION_CHANGE == (GENERIC_CONFIRM_ID_T)request_id ) - { - // If the user selected accept or reject on the UF rate change ID, call the below function to handle the signal - // This is to make sure if during the UF rate change process the HD Software transitioned to treatment stop, standby, fault - // or other modes the screen is not left open. - handleUFRateConfirmationMessageFromUI(); - } } }