Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -rf1253893206dece006b6bdb47ccdc22574cdbda9 -r19aba08f16ac2b5de18be8965767966e9698d03a --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision f1253893206dece006b6bdb47ccdc22574cdbda9) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 19aba08f16ac2b5de18be8965767966e9698d03a) @@ -48,7 +48,7 @@ #define PRE_TREATMENT_FLUSH_RESERVOIR_VOLUME_ML 500 ///< Fill reservoir to this volume (in mL) to flush filter and lines. #define PRE_TREATMENT_FILL_RESERVOIR_ONE_VOLUME_ML 900 ///< Fill reservoir one to this volume (in mL) during pre-treatment mode. -#define PRE_TREATMENT_FILL_RESERVOIR_TWO_VOLUME_ML 900 ///< Fill reservoir two to this volume (in mL) during pre-treatment mode. +#define PRE_TREATMENT_FILL_RESERVOIR_TWO_VOLUME_ML 1100 ///< Fill reservoir two to this volume (in mL) during pre-treatment mode. /// States of the pre-treatment reservoir management state machine. typedef enum PreTreatmentReservoirMgmt_States Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -ra5c69f5977fea48c49ad4d2e090cf618e6cb145d -r19aba08f16ac2b5de18be8965767966e9698d03a --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision a5c69f5977fea48c49ad4d2e090cf618e6cb145d) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 19aba08f16ac2b5de18be8965767966e9698d03a) @@ -1432,35 +1432,36 @@ F32 const resOneWeight = getReservoirWeightLargeFilter( DG_RESERVOIR_1 ); setupDisplacementVolume = fabs( resOneWeight - WET_SELF_TEST_RESERVOIR_ONE_SETUP_VOLUME_ML ); - if ( FALSE == isValvesSettingSent ) + //if ( FALSE == isValvesSettingSent ) { isValvesSettingSent = TRUE; setValvePosition( VDI, VALVE_POSITION_C_CLOSE ); setValvePosition( VDO, VALVE_POSITION_C_CLOSE ); - if ( resOneWeight > WET_SELF_TEST_RESERVOIR_ONE_SETUP_VOLUME_ML ) + // TODO remove + /*if ( resOneWeight > WET_SELF_TEST_RESERVOIR_ONE_SETUP_VOLUME_ML ) { cmdChangeDGValveSetting( DG_VALVE_SETTING_R1_TO_R2 ); } else { cmdChangeDGValveSetting( DG_VALVE_SETTING_R2_TO_R1 ); - } + }*/ } - if ( ( TRUE == isValvesSettingSent ) && ( TRUE == getDGCommandResponse( DG_CMD_VALVE_SETTING, &cmdResp ) ) ) + //if ( ( TRUE == isValvesSettingSent ) && ( TRUE == getDGCommandResponse( DG_CMD_VALVE_SETTING, &cmdResp ) ) ) { // Re-send command if DG rejects - isValvesSettingSent = FALSE; + //isValvesSettingSent = FALSE; - if ( FALSE == cmdResp.rejected ) + //if ( FALSE == cmdResp.rejected ) { F32 bolusVol = getTreatmentParameterF32( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME ); setDialInPumpTargetFlowRate( DIP_FLOW_RATE_SETUP_ML_MIN, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); - fmdIntegratedVolume = 0.0; + fmdIntegratedVolume = 0.0F; - if ( ( bolusVol > 0.0 ) && ( getSyringePumpVolumeDelivered() < bolusVol ) ) + if ( ( bolusVol > 0.0F ) && ( getSyringePumpVolumeDelivered() < bolusVol ) ) { startHeparinBolus(); // moved here from startHeparinPump() in Dialysis.c } @@ -1595,8 +1596,9 @@ if ( SELF_TEST_STATUS_PASSED == getBloodLeakSelfTestStatus() ) { - settleStartTime = getMSTimerCount(); - state = WET_SELF_TESTS_FIRST_DISPLACEMENT_SETUP_STATE; + settleStartTime = getMSTimerCount(); + isValvesSettingSent = FALSE; + state = WET_SELF_TESTS_FIRST_DISPLACEMENT_SETUP_STATE; } if ( TRUE == doesAlarmStatusIndicateStop() )