Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r5e88efbadfacd95cbf2c3620a9520fe4f9b6fd46 -re06d369137e7ba150249b038c0649b434ac2f2f3 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 5e88efbadfacd95cbf2c3620a9520fe4f9b6fd46) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision e06d369137e7ba150249b038c0649b434ac2f2f3) @@ -218,6 +218,9 @@ loadCell * loadCellsCalRecord.loadCells[ (CAL_DATA_DG_LOAD_CELLS_T)ii ].gain + loadCellsCalRecord.loadCells[ (CAL_DATA_DG_LOAD_CELLS_T)ii ].offset; + // Monitor the load cells weight + monitorLoadCellsWeightOutOfRange( (LOAD_CELL_ID_T)ii ); + loadcells[ ii ].loadCellVelocity_g_min = ( getLoadCellWeight( (LOAD_CELL_ID_T)ii ) - loadcells[ ii ].smallFilterReadings[ smallReadingsIdx ] ) * (F32)SEC_PER_MIN; @@ -229,9 +232,6 @@ // Calculate the load cell value before applying calibration to it loadcells[ ii ].smallFilteredWeight.data = (F32)( loadcells[ ii ].smallFilterTotal / (F64)SIZE_OF_SMALL_LOAD_CELL_AVG ); - // Monitor the load cells weight - monitorLoadCellsWeightOutOfRange( (LOAD_CELL_ID_T)ii ); - // Apply the tare offset. NOTE: tare must be applied after checking the weight out of range. loadcells[ ii ].smallFilteredWeight.data -= loadcells[ ii ].autoCalOffset; } @@ -501,7 +501,7 @@ *************************************************************************/ static void monitorLoadCellsWeightOutOfRange( LOAD_CELL_ID_T loadCell ) { - F32 weight = getLoadCellSmallFilteredWeight( loadCell ); + F32 weight = getLoadCellWeight( loadCell ); 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 );