Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r03efe69734fc9539f4198ddba6f93614ea08ea7c -rcd5be724d5a3ba7457e761191d82f278654d7f5c --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 03efe69734fc9539f4198ddba6f93614ea08ea7c) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision cd5be724d5a3ba7457e761191d82f278654d7f5c) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2021-2023 Diality Inc. - All Rights Reserved. +* Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file SelfTests.c * -* @author (last) Sean Nash -* @date (last) 08-Sep-2023 +* @author (last) Bill Bracken +* @date (last) 18-Oct-2023 * * @author (original) Quang Nguyen * @date (original) 28-Jan-2021 @@ -1682,7 +1682,11 @@ setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); - startHeparinBolus(); // Function will only start bolus if necessary + // if user set a Heparin bolus volume, request bolus to be initiated now + if ( bolusVol > 0.0F ) + { + startHeparinBolus(); // Function will only start bolus if necessary + } if ( TRUE == doesAlarmStatusIndicateStop() ) { @@ -1850,6 +1854,7 @@ { if ( TRUE == hasBloodLeakZeroSequenceFailed() ) { + zeroBloodLeakReset(); #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) #endif @@ -2196,6 +2201,7 @@ static WET_SELF_TESTS_STATE_T handleWetSelfTestStoppedState( void ) { WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_STOPPED_STATE; + F32 bolusVol = getTreatmentParameterF32( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME ); setAlarmResumePerDoorAndLatch(); doorClosedRequired( FALSE, FALSE ); @@ -2213,8 +2219,13 @@ selfTestStartTime = getMSTimerCount(); doorClosedRequired( TRUE, TRUE ); selfTestsResumeRequested = FALSE; - startHeparinBolus(); // Function will only start bolus if necessary + // if user set a Heparin bolus volume, request bolus to be initiated now + if ( bolusVol > 0.0F ) + { + startHeparinBolus(); // Function will only start bolus if necessary + } + switch( checkpointWetSelfTestsState ) { case WET_SELF_TESTS_BUBBLE_CHECK_SETUP_STATE: