Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r865785dfdd5e38a77a01ce2e05c3204a86c49890 -rd7e0662faa8c6e4e86924afad5bc3dd58b41810a --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 865785dfdd5e38a77a01ce2e05c3204a86c49890) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision d7e0662faa8c6e4e86924afad5bc3dd58b41810a) @@ -8,7 +8,7 @@ * @file BloodLeak.c * * @author (last) Dara Navaei -* @date (last) 13-Sep-2023 +* @date (last) 24-Oct-2023 * * @author (original) Peman Montazemi * @date (original) 18-Mar-2021 @@ -397,6 +397,22 @@ /*********************************************************************//** * @brief + * The zeroBloodLeakReset function resets the commandRqstCount for all the + * zero blood leak commands. + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +void zeroBloodLeakReset( void ) +{ + resetEmbModeCmdRqstCount( Z_EMB_MODE_CMD ); + resetEmbModeCmdRqstCount( G_EMB_MODE_CMD ); + resetEmbModeCmdRqstCount( Q_EMB_MODE_CMD ); + resetEmbModeCmdRqstCount( T_EMB_MODE_CMD ); +} + +/*********************************************************************//** + * @brief * The hasBloodLeakZeroSequenceFailed function returns TURE if the number * of times the zero sequence has failed. * @details Inputs: bloodLeakEmbModeCmd @@ -637,10 +653,7 @@ if ( FALSE == hasCmdSqncFailed ) { // Done with zero sequence, transition to other states - resetEmbModeCmdRqstCount( Z_EMB_MODE_CMD ); - resetEmbModeCmdRqstCount( G_EMB_MODE_CMD ); - resetEmbModeCmdRqstCount( Q_EMB_MODE_CMD ); - resetEmbModeCmdRqstCount( T_EMB_MODE_CMD ); + zeroBloodLeakReset(); bloodLeakSelfTestStatus = SELF_TEST_STATUS_PASSED; state = BLOOD_LEAK_NORMAL_STATE; }