Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r56f14d709de1a3de6a3a450e994d59b7e434e638 -rb0127e7ae2faa9cbdf4bf13e52ea4c526d38f411 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 56f14d709de1a3de6a3a450e994d59b7e434e638) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision b0127e7ae2faa9cbdf4bf13e52ea4c526d38f411) @@ -207,6 +207,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; @@ -218,9 +221,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; } @@ -489,7 +489,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 );