Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r608780a6e5449b5a9710ac07299ec028117c9f4d -r0c7c49178d75dff4f7dd893e7f35e74432848d38 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 608780a6e5449b5a9710ac07299ec028117c9f4d) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 0c7c49178d75dff4f7dd893e7f35e74432848d38) @@ -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 );