Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r09e6cf9de34acf18f6e1138bf56ac0edb4821186 -rdee324600666944baf72278ea33b8775b87a0a0e --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 09e6cf9de34acf18f6e1138bf56ac0edb4821186) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision dee324600666944baf72278ea33b8775b87a0a0e) @@ -822,10 +822,9 @@ { DRY_SELF_TESTS_STATE_T state = DRY_SELF_TESTS_USED_CARTRIDGE_CHECK_STATE; - BUBBLE_STATUS_T const ADABubbleStatus = getBubbleStatus( ADA ); BUBBLE_STATUS_T const ADVBubbleStatus = getBubbleStatus( ADV ); - if ( ( BUBBLE_DETECTED == ADABubbleStatus ) && ( BUBBLE_DETECTED == ADVBubbleStatus ) && + if ( ( BUBBLE_DETECTED == ADVBubbleStatus ) && ( AIR_TRAP_LEVEL_AIR == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) && ( AIR_TRAP_LEVEL_AIR == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) ) { @@ -1102,7 +1101,6 @@ if ( setupDisplacementVolume <= 0 ) { signalDialInPumpHardStop(); - selfTestBubble( ADA ); selfTestBubble( ADV ); state = WET_SELF_TESTS_BUBBLES_STATE; } @@ -1128,7 +1126,7 @@ { WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_BUBBLES_STATE; - if ( ( SELF_TEST_STATUS_PASSED == getBubbleSelfTestStatus( ADA ) ) && ( SELF_TEST_STATUS_PASSED == getBubbleSelfTestStatus( ADV ) ) ) + if ( SELF_TEST_STATUS_PASSED == getBubbleSelfTestStatus( ADV ) ) { state = WET_SELF_TESTS_PRIME_CHECK_STATE; } @@ -1156,7 +1154,6 @@ WET_SELF_TESTS_STATE_T state = WET_SELF_TESTS_PRIME_CHECK_STATE; *result = SELF_TEST_STATUS_FAILED; - BUBBLE_STATUS_T const ADABubbleStatus = getBubbleStatus( ADA ); BUBBLE_STATUS_T const ADVBubbleStatus = getBubbleStatus( ADV ); #ifndef SKIP_AIR_BUBBLE_CHECK Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r6982379266891326c9d45aecd7d54ad5c85ea69f -rdee324600666944baf72278ea33b8775b87a0a0e --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 6982379266891326c9d45aecd7d54ad5c85ea69f) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision dee324600666944baf72278ea33b8775b87a0a0e) @@ -2005,34 +2005,100 @@ fpgaActuatorSetPoints.fpgaSensorTest &= ~FPGA_BLOOD_LEAK_SELF_TEST_CMD; } +/*********************************************************************//** + * @brief + * The getFPGABloodLeakZeroStatusCounter function returns the blood leak + * zero status counter + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.ZLeakCounter + *************************************************************************/ U08 getFPGABloodLeakZeroStatusCounter( void ) { return fpgaSensorReadings.ZLeakCounter; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakCounter function returns the blood leak counter. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.BLeakCounter + *************************************************************************/ U08 getFPGABloodLeakCounter( void ) { return fpgaSensorReadings.BLeakCounter; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakZeroedStatus function returns the blood leak zeroed status. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodLeakZeroedStatus + *************************************************************************/ U08 getFPGABloodLeakZeroedStatus( void ) { return fpgaSensorReadings.bloodLeakZeroedStatus; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakDetectSetPoint function returns the blood leak detect + * set point. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodDetectSetPoint + *************************************************************************/ U16 getFPGABloodLeakDetectSetPoint( void ) { return fpgaSensorReadings.bloodDetectSetPoint; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakDetectLevel function returns the blood leak detect level. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodDetectLevel + *************************************************************************/ U16 getFPGABloodLeakDetectLevel( void ) { return fpgaSensorReadings.bloodDetectLevel; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakStCount function returns the blood leak st count. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodStCount + *************************************************************************/ U16 getFPGABloodLeakStCount( void ) { return fpgaSensorReadings.bloodStCount; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakLEDIntensity function returns the blood leak LED intensity. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodLEDIntensity + *************************************************************************/ U16 getFPGABloodLeakLEDIntensity( void ) { return fpgaSensorReadings.bloodLEDIntensity; } + +/*********************************************************************//** + * @brief + * The getFPGABloodLeakRegisterCounter function returns the blood leak register + * counter. + * @details Inputs: none + * @details Outputs: none + * @return fpgaSensorReadings.bloodRdCounter + *************************************************************************/ U16 getFPGABloodLeakRegisterCounter( void ) { return fpgaSensorReadings.bloodRdCounter; @@ -2050,12 +2116,8 @@ { U16 noFPGABubbleDetected = 0; - if ( bubble == ADA ) + if ( bubble == ADV ) { - noFPGABubbleDetected = fpgaSensorReadings.fpgaGPIO & FPGA_ADA_BUBBLE_STATUS_MASK; - } - else if ( bubble == ADV ) - { noFPGABubbleDetected = fpgaSensorReadings.fpgaGPIO & FPGA_ADV_BUBBLE_STATUS_MASK; } else @@ -2076,12 +2138,8 @@ *************************************************************************/ void setFPGABubbleSelfTest( U32 bubble ) { - if ( bubble == ADA ) + if ( bubble == ADV ) { - fpgaActuatorSetPoints.fpgaSensorTest |= FPGA_ADA_BUBBLE_SELF_TEST_CMD; - } - else if ( bubble == ADV ) - { fpgaActuatorSetPoints.fpgaSensorTest |= FPGA_ADV_BUBBLE_SELF_TEST_CMD; } } @@ -2096,12 +2154,8 @@ *************************************************************************/ void clearFPGABubbleSelfTest( U32 bubble ) { - if ( bubble == ADA ) + if ( bubble == ADV ) { - fpgaActuatorSetPoints.fpgaSensorTest &= ~FPGA_ADA_BUBBLE_SELF_TEST_CMD; - } - else if ( bubble == ADV ) - { fpgaActuatorSetPoints.fpgaSensorTest &= ~FPGA_ADV_BUBBLE_SELF_TEST_CMD; } else