Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r44459c11d7f3d39967b3eb6ec284403358d6a287 -rc0ef736096da93e4d094f2408146f0238fd2328a --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 44459c11d7f3d39967b3eb6ec284403358d6a287) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision c0ef736096da93e4d094f2408146f0238fd2328a) @@ -162,7 +162,7 @@ *************************************************************************/ void execLoadCell( void ) { - U08 ii; + LOAD_CELL_ID_T ii; U32 a1 = getFPGALoadCellA1(); U32 a2 = getFPGALoadCellA2(); U32 b1 = getFPGALoadCellB1(); @@ -212,7 +212,7 @@ } // Rolling average of last 100 raw samples in small filter - for ( ii = 0; ii < NUM_OF_LOAD_CELLS; ++ii ) + for ( ii = LOAD_CELL_RESERVOIR_1_PRIMARY; ii < NUM_OF_LOAD_CELLS; ++ii ) { F32 loadCell = (F32)loadcells[ ii ].rawReading * ADC2GRAM; @@ -233,7 +233,7 @@ { isLoadCellOutOfRange = TRUE; alarmID = ii; - alarmLoadCell = loadCell; + alarmLoadCell = weight; } loadcells[ ii ].loadCellVelocity_g_min = ( getLoadCellWeight( (LOAD_CELL_ID_T)ii ) - @@ -257,7 +257,7 @@ // filter every 100ms if ( ++loadCellFilterTimerCount >= LOAD_CELL_REPORT_PERIOD ) { - for ( ii = 0; ii < NUM_OF_LOAD_CELLS; ++ii ) + for ( ii = LOAD_CELL_RESERVOIR_1_PRIMARY; ii < NUM_OF_LOAD_CELLS; ++ii ) { // Update large filter with new small filter weight sample loadcells[ ii ].largeFilterTotal -= loadcells[ ii ].largeFilterReadings[ largeReadingsIdx ];