Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -reb0949253d49058defea55b07876920d887d7f78 -r791b25bd20e80fce8c5d7e8a3ac37d8395f2315c --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision eb0949253d49058defea55b07876920d887d7f78) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 791b25bd20e80fce8c5d7e8a3ac37d8395f2315c) @@ -637,28 +637,10 @@ state = BLOOD_LEAK_NORMAL_STATE; } // If not successful, retry if we've not run out - else if ( bloodLeakEmbModeCmd[ Z_EMB_MODE_CMD ].commandRqstCount < BLOOD_LEAK_EMB_MODE_MAX_NUM_CMD_TRIES ) - { - if ( TRUE == zeroBloodLeak() ) - { - // Check if the zero sequence has been successfully enqueued - // If the command retry of one of the commands in the zero sequence failed, it means all of them have failed - // So in this condition only the Z command is checked - bloodLeakEmbModeCmd[ Z_EMB_MODE_CMD ].commandRqstCount++; // TODO remove - } - } - // If out of retries, fault else { -#ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) -#endif - { - bloodLeakSelfTestStatus = SELF_TEST_STATUS_FAILED; - state = BLOOD_LEAK_INIT_STATE; - - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BLOOD_LEAK_SENSOR_ZERO_SEQUENCE_FAILED, failedCmd ); - } + bloodLeakSelfTestStatus = SELF_TEST_STATUS_FAILED; + state = BLOOD_LEAK_INIT_STATE; } } Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -rf1157c760b320bf088921a25eb78e973d6341578 -r791b25bd20e80fce8c5d7e8a3ac37d8395f2315c --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision f1157c760b320bf088921a25eb78e973d6341578) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 791b25bd20e80fce8c5d7e8a3ac37d8395f2315c) @@ -128,7 +128,6 @@ static U32 treatmentStartTimeStamp; ///< Treatment start timestampt for logging purpose. static U32 treatmentEndTimeStamp; ///< Treatment end timestampt for logging purpose. -static BOOL hasTreatmentStartTimeBeenWrittenToNV; ///< Boolean flag to indicate whether treatment start time has been started or not. // ********** private function prototypes ********** @@ -195,7 +194,6 @@ treatmentStartTimeStamp = getRTCTimestamp(); treatmentEndTimeStamp = 0; - hasTreatmentStartTimeBeenWrittenToNV = FALSE; } /*********************************************************************//** @@ -221,6 +219,9 @@ initTreatmentEnd(); } + // Started the treatment set the start time in epoch + setTxLastStartTimeEpoch( getRTCTimestamp() ); + setCurrentSubState( NO_SUB_STATE ); // Enable venous bubble detection in treatment mode setVenousBubbleDetectionEnabled( TRUE ); @@ -629,13 +630,6 @@ checkDialysateTemperature(); } - // Record treatment start time if not done yet - if ( FALSE == hasTreatmentStartTimeBeenWrittenToNV ) - { - // Started the treatment set the start time in epoch - hasTreatmentStartTimeBeenWrittenToNV = setTxLastStartTimeEpoch( getRTCTimestamp() ); - } - // Treatment mode state machine switch ( currentTreatmentState ) { Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -reb0949253d49058defea55b07876920d887d7f78 -r791b25bd20e80fce8c5d7e8a3ac37d8395f2315c --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision eb0949253d49058defea55b07876920d887d7f78) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 791b25bd20e80fce8c5d7e8a3ac37d8395f2315c) @@ -1696,9 +1696,14 @@ if ( TRUE == didTimeout( bloodLeakDebubbleStartTimeMS, BLOOD_LEAK_DETECTOR_DEBUBBLE_TIMEOUT_MS ) ) { - if ( TRUE == zeroBloodLeak() ) + signalDialInPumpHardStop(); + + if ( FALSE == isDialInPumpRunning() ) { - state = WET_SELF_TESTS_BLOOD_LEAK_DETECTOR_STATE; + if ( TRUE == zeroBloodLeak() ) + { + state = WET_SELF_TESTS_BLOOD_LEAK_DETECTOR_STATE; + } } } @@ -1735,7 +1740,12 @@ { if ( TRUE == hasBloodLeakZeroSequenceFailed() ) { - activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_SENSOR_ZERO_SEQUENCE_FAILED ); +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_SENSOR_ZERO_SEQUENCE_FAILED ); + } } else { @@ -1747,15 +1757,6 @@ } } -#ifndef _RELEASE_ - if ( ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_SELF_TEST ) ) ) - { - settleStartTime = getMSTimerCount(); - isValvesSettingSent = FALSE; - state = WET_SELF_TESTS_FIRST_DISPLACEMENT_SETUP_STATE; - } -#endif - if ( TRUE == doesAlarmStatusIndicateStop() ) { state = WET_SELF_TESTS_STOPPED_STATE; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rf1157c760b320bf088921a25eb78e973d6341578 -r791b25bd20e80fce8c5d7e8a3ac37d8395f2315c --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision f1157c760b320bf088921a25eb78e973d6341578) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 791b25bd20e80fce8c5d7e8a3ac37d8395f2315c) @@ -1013,7 +1013,6 @@ memcpy( &payload, message->payload, sizeof( MODE_CHEMICAL_DISINFECT_DATA_T ) ); uiStates.heatDisinfectUIState = 0; - uiStates.chemDisinfectUIState = payload.chemDisinfectUIState; uiStates.flushUIState = 0; setDGDisinfectsStates( uiStates );