Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r4b1ba8cd7ec9cf77dca601df9356f4596d91158f -r7fb16c92973a551dda1d801d5f255f88c0c81f12 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 4b1ba8cd7ec9cf77dca601df9356f4596d91158f) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 7fb16c92973a551dda1d801d5f255f88c0c81f12) @@ -469,6 +469,8 @@ * @brief * The monitorLoadCellsWeightOutOfRange function monitors the weight of the * load cells and if they are not in range, it raises an alarm. + * Function must be called prior to applying tare so that un-tared weight + * is checked for out of range. * @details Inputs: none * @details Outputs: none * @param loadCell which is the load cell ID that its range is checked @@ -477,7 +479,7 @@ static void monitorLoadCellsWeightOutOfRange( LOAD_CELL_ID_T loadCell ) { F32 weight = getLoadCellSmallFilteredWeight( loadCell ); - BOOL isWeightOutOfRange = ( weight < LOAD_CELL_MIN_ALLOWED_WEIGHT_GRAMS ) || ( weight > LOAD_CELL_MAX_ALLOWED_WEIGHT_GRAMS ); + BOOL isWeightOutOfRange = ( ( weight < LOAD_CELL_MIN_ALLOWED_WEIGHT_GRAMS ) || ( weight > LOAD_CELL_MAX_ALLOWED_WEIGHT_GRAMS ) ? TRUE : FALSE ); checkPersistentAlarm( ALARM_ID_DG_LOAD_CELL_WEIGHT_OUT_OF_RANGE, isWeightOutOfRange, weight, LOAD_CELL_MAX_ALLOWED_WEIGHT_GRAMS ); }