Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -ra15b3ca05344fb3aeb49dc41c384345ec2651ce0 -ra3a6cd2db3c03262d9da832753eeb77158845f28 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision a15b3ca05344fb3aeb49dc41c384345ec2651ce0) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision a3a6cd2db3c03262d9da832753eeb77158845f28) @@ -74,7 +74,8 @@ #define WET_SELF_TEST_INTEGRATED_VOLUME_PCT_TOLERANCE 0.05F ///< Tolerance on integrated volume as a percentage (5%). #define WET_SELF_TEST_INTEGRATED_VOLUME_TOLERANCE 20.0F ///< Tolerance on integrated volume in grams. #define WET_SELF_TEST_DISPLACEMENT_TOLERANCE_G 20.0F ///< Tolerance in the load cell readings of the displacement in grams. -#define WET_SELF_TEST_DISPLACEMENT_TIME_MS ( SEC_PER_MIN * MS_PER_SECOND ) ///< Time to displace dialysate in wet self-test in ms. +#define WET_SELF_TEST_FIRST_DISPLACEMENT_TIME_MS ( SEC_PER_MIN * MS_PER_SECOND ) ///< Time to displace dialysate in wet self-test in ms (first). +#define WET_SELF_TEST_SECOND_DISPLACEMENT_TIME_MS ( 30 * MS_PER_SECOND ) ///< Time to displace dialysate in wet self-test in ms (second). #define RESERVOIR_SETTLE_TIME_MS ( 5 * MS_PER_SECOND ) ///< Time allotted for reservoir to settle in ms. #define MAX_NO_CARTRIDGE_SELF_TEST_TIME 30 ///< Maximum no cartridge self-test time (in seconds). @@ -592,7 +593,8 @@ WET_SELF_TESTS_STATE_T priorSubState = currentWetSelfTestsState; #ifndef _RELEASE_ - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_WET_SELF_TEST ) == SW_CONFIG_ENABLE_VALUE ) + if ( ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRIMING ) ) || + ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_WET_SELF_TEST ) ) ) { currentWetSelfTestsState = WET_SELF_TESTS_COMPLETE_STATE; } @@ -1043,7 +1045,7 @@ else { #ifndef _RELEASE_ - if ( SW_CONFIG_DISABLE_VALUE != getSoftwareConfigStatus( SW_CONFIG_DISABLE_AIR_PUMP ) ) + if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_AIR_PUMP ) ) { // Wait for reservoirs to drain before starting this test @@ -1754,10 +1756,10 @@ // This is not a volume for now and it is a flow rate. fmdIntegratedVolume += getMeasuredDialInFlowRate(); - if ( TRUE == didTimeout( displacementStartTime, WET_SELF_TEST_DISPLACEMENT_TIME_MS ) ) + if ( TRUE == didTimeout( displacementStartTime, WET_SELF_TEST_FIRST_DISPLACEMENT_TIME_MS ) ) { signalDialInPumpHardStop(); - fmdIntegratedVolume = ( ( fmdIntegratedVolume * TASK_GENERAL_INTERVAL ) / ( WET_SELF_TEST_DISPLACEMENT_TIME_MS ) ); + fmdIntegratedVolume = ( ( fmdIntegratedVolume * TASK_GENERAL_INTERVAL ) / ( WET_SELF_TEST_FIRST_DISPLACEMENT_TIME_MS ) ); settleStartTime = getMSTimerCount(); state = WET_SELF_TESTS_FIRST_DISPLACEMENT_VERIFY_STATE; } @@ -1896,10 +1898,10 @@ { fmdIntegratedVolume += getMeasuredDialInFlowRate(); - if ( TRUE == didTimeout( displacementStartTime, WET_SELF_TEST_DISPLACEMENT_TIME_MS ) ) + if ( TRUE == didTimeout( displacementStartTime, WET_SELF_TEST_SECOND_DISPLACEMENT_TIME_MS ) ) { signalDialInPumpHardStop(); - fmdIntegratedVolume = ( ( fmdIntegratedVolume * TASK_GENERAL_INTERVAL ) / ( WET_SELF_TEST_DISPLACEMENT_TIME_MS ) ); + fmdIntegratedVolume = ( ( fmdIntegratedVolume * TASK_GENERAL_INTERVAL ) / ( WET_SELF_TEST_SECOND_DISPLACEMENT_TIME_MS ) ); settleStartTime = getMSTimerCount(); state = WET_SELF_TESTS_SECOND_DISPLACEMENT_VERIFY_STATE; }