Index: firmware/App/Monitors/Level.c =================================================================== diff -u -r02c2059fd465609e56c6240d2855c91be2129fd6 -r268b3f1b55eda9eb47ab3cb8b3a364ff8eb9d502 --- firmware/App/Monitors/Level.c (.../Level.c) (revision 02c2059fd465609e56c6240d2855c91be2129fd6) +++ firmware/App/Monitors/Level.c (.../Level.c) (revision 268b3f1b55eda9eb47ab3cb8b3a364ff8eb9d502) @@ -264,67 +264,120 @@ if ( D6_LEVL == levelId ) { - levelStatus = getFPGAD6LevelStatus(); + levelStatus = getFPGAD6LevelStatus(); - if ( FPGA_LEVEL_EMPTY == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_EMPTY ; - } - else if ( FPGA_LEVEL_LOW == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_LOW ; - } - else if ( FPGA_LEVEL_MEDIUM == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_MEDIUM ; - } - else if ( FPGA_LEVEL_HIGH == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_HIGH ; - } - else - { - // TODO - Handle invalid level alarm - currentLevelStatus = LEVEL_STATE_ILLEGAL ; - } + if ( getTestConfigStatus( TEST_CONFIG_BETA_1_9 ) == TRUE ) + { + // Beta 1.9 behavior supports EMPTY state + if ( FPGA_LEVEL_EMPTY == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_EMPTY; + } + else if ( FPGA_LEVEL_LOW == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_LOW; + } + else if ( FPGA_LEVEL_MEDIUM == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_MEDIUM; + } + else if ( FPGA_LEVEL_HIGH == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_HIGH; + } + else + { + // TODO - Handle invalid level alarm + currentLevelStatus = LEVEL_STATE_ILLEGAL; + } + } + else + { + // Beta 1.0 behavior + if ( FPGA_LEVEL_LOW == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_LOW; + } + else if ( FPGA_LEVEL_MEDIUM == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_MEDIUM; + } + else if ( FPGA_LEVEL_HIGH == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_HIGH; + } + else + { + // TODO - Handle invalid level alarm + currentLevelStatus = LEVEL_STATE_ILLEGAL; + } + } } else if ( P25_LEVL == levelId ) { - levelStatus = getFPGAP25FloaterState(); + levelStatus = getFPGAP25FloaterState(); - if ( FPGA_LEVEL_EMPTY == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_EMPTY ; - } - else if ( FPGA_LEVEL_LOW == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_LOW ; - } - else if ( FPGA_LEVEL_MEDIUM == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_MEDIUM ; - } - else if ( FPGA_LEVEL_HIGH == levelStatus ) - { - currentLevelStatus = LEVEL_STATE_HIGH ; - } - else - { - // TODO - Handle invalid level alarm - currentLevelStatus = LEVEL_STATE_ILLEGAL ; - } + if ( getTestConfigStatus( TEST_CONFIG_BETA_1_9 ) == TRUE ) + { + // Beta 1.9 behavior supports EMPTY state + if ( FPGA_LEVEL_EMPTY == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_EMPTY; + } + else if ( FPGA_LEVEL_LOW == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_LOW; + } + else if ( FPGA_LEVEL_MEDIUM == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_MEDIUM; + } + else if ( FPGA_LEVEL_HIGH == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_HIGH; + } + else + { + // TODO - Handle invalid level alarm + currentLevelStatus = LEVEL_STATE_ILLEGAL; + } + } + else + { + // Beta 1.0 behavior (no EMPTY handling) + if ( FPGA_LEVEL_LOW == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_LOW; + } + else if ( FPGA_LEVEL_MEDIUM == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_MEDIUM; + } + else if ( FPGA_LEVEL_HIGH == levelStatus ) + { + currentLevelStatus = LEVEL_STATE_HIGH; + } + else + { + // TODO - Handle invalid level alarm + currentLevelStatus = LEVEL_STATE_ILLEGAL; + } + } } + else { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_DD_INVALID_LEVEL_ID, (U32)levelId ) + currentLevelStatus = LEVEL_STATE_ILLEGAL; + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_DD_INVALID_LEVEL_ID, (U32)levelId ); } return currentLevelStatus; } /*********************************************************************//** * @brief - * Derive Bicarb chamber F level from the two level sensors. + * The getBicarbChamberLevelStatus function returns the status of Bicarb chamber + * F level from the upper level and lower level sensors. * @details \b Inputs: FPGA level sensor data * @details \b Outputs: level * @return level status