Index: firmware/App/Monitors/Level.c =================================================================== diff -u -reb40fb713ed387f87aa4d9ed9b9f42f91881064e -rd224ea9c16866ca84a62782dd9027fa162af2dbd --- firmware/App/Monitors/Level.c (.../Level.c) (revision eb40fb713ed387f87aa4d9ed9b9f42f91881064e) +++ firmware/App/Monitors/Level.c (.../Level.c) (revision d224ea9c16866ca84a62782dd9027fa162af2dbd) @@ -32,7 +32,7 @@ #define FPGA_LEVEL_MEDIUM 4 ///< Floater medium level status #define FPGA_LEVEL_HIGH 6 ///< Floater high level status #define LEVEL_COUNT_LOW 0xFFFF ///< Level sensor count when fluid level is low or non submerged -#define LEVEL_COUNT_HIGH_START 0x2000 ///< Start range of level sensor count when fluid level is high or submerged +#define LEVEL_COUNT_HIGH_START 0x0000 ///< Start range of level sensor count when fluid level is high or submerged #define LEVEL_COUNT_HIGH_END 0x2FFF ///< End range of level sensor count when fluid level is high or submerged #define LOW_LEVEL_COUNT_TOLERANCE ( ( LEVEL_COUNT_LOW / 100 ) * 1 ) ///< Level sensor count 1% tolerance for low level #define HIGH_LEVEL_COUNT_TOLERANCE ( ( LEVEL_COUNT_HIGH / 100 ) * 1 ) ///< Level sensor count 1% tolerance for high level @@ -233,15 +233,12 @@ BOOL level = FALSE; // Check the level count with in the high level range - if ( ( count >= LEVEL_COUNT_HIGH_START ) && - ( count <= LEVEL_COUNT_HIGH_END ) ) + if ( count == LEVEL_COUNT_HIGH_START || + ( ( count > LEVEL_COUNT_HIGH_START ) && + ( count <= LEVEL_COUNT_HIGH_END ) ) ) { level = TRUE; } - else - { - level = FALSE; - } return level; }