Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r660876bca7ae34f862ae9cc6feef9a30ec02fe94 -r5d9c5362b537331248dc592e05b6b016267eb6d3 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 660876bca7ae34f862ae9cc6feef9a30ec02fe94) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 5d9c5362b537331248dc592e05b6b016267eb6d3) @@ -542,6 +542,7 @@ BLOOD_LEAK_STATE_T state = BLOOD_LEAK_CHECK_ZERO_AND_SELF_TEST_STATE; BOOL areCommandsReady = TRUE; + // Check to see if all commands in sequence have been responded to for ( i = 0; i < NUM_OF_EMB_CMDS; i++ ) { switch( i ) @@ -556,6 +557,7 @@ } } + // When all commands in sequence have been responded to, determine whether anything went wrong if ( TRUE == areCommandsReady ) { // Enqueue the zero and self test sequence (Z->G->Z->Q->T) @@ -585,6 +587,7 @@ } } + // Pass self-test if entire sequence was successful if ( FALSE == hasCmdSqncFailed ) { // Done with zero sequence, transition to other states @@ -593,6 +596,7 @@ bloodLeakSelfTestStatus = SELF_TEST_STATUS_PASSED; state = BLOOD_LEAK_NORMAL_STATE; } + // If not successful, retry if we've not run out else if ( bloodLeakEmbModeCmd[ Z_EMB_MODE_CMD ].commandRetryCount < BLOOD_LEAK_EMB_MODE_MAX_NUM_CMD_TRIES ) { if ( TRUE == zeroBloodLeak() ) @@ -603,6 +607,7 @@ bloodLeakEmbModeCmd[ Z_EMB_MODE_CMD ].commandRetryCount++; } } + // If out of retries, fault else { #ifndef _RELEASE_