Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -r1af5c9d200064f18e2727e896f74308e683492a7 -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision 1af5c9d200064f18e2727e896f74308e683492a7) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) @@ -103,22 +103,21 @@ smallReadingsIdx = 0; largeReadingsIdx = 0; loadCellDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; + loadCellFilterTimerCount = 0; for ( i = 0; i < NUM_OF_LOAD_CELLS; i++ ) { - loadcells[ i ].rawReading = 0; + benignPolynomialCalRecord( &loadCellsCalRecord.loadCells[ i ] ); - loadcells[ i ].weight.data = 0.0; - loadcells[ i ].weight.ovData = 0.0; - loadcells[ i ].weight.ovInitData = 0.0; - loadcells[ i ].weight.override = OVERRIDE_RESET; - - loadcells[ i ].autoCalOffset = 0.0; - - loadcells[ i ].largeFilterTotal = 0.0; + loadcells[ i ].rawReading = 0; + loadcells[ i ].weight.data = 0.0; + loadcells[ i ].weight.ovData = 0.0; + loadcells[ i ].weight.ovInitData = 0.0; + loadcells[ i ].weight.override = OVERRIDE_RESET; + loadcells[ i ].autoCalOffset = 0.0; + loadcells[ i ].largeFilterTotal = 0.0; loadcells[ i ].largeFilteredWeight = 0.0; - - loadcells[ i ].smallFilterTotal = 0.0; + loadcells[ i ].smallFilterTotal = 0.0; loadcells[ i ].smallFilteredWeight = 0.0; for ( j = 0; j < SIZE_OF_SMALL_LOAD_CELL_AVG; j++ ) @@ -174,7 +173,7 @@ b2 = ( b2 >> 31 ); if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_DG_LOAD_CELL_ADC_ERROR, ( ( a1 > 0 ) || ( a2 > 0 ) || ( b1 > 0 ) || ( b2 > 0 ) ) ) ) { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_LOAD_CELL_ADC_ERROR, ( a1 | a2 | b1 | b2 ) ) + //SET_ALARM_WITH_1_U32_DATA( ALARM_ID_DG_LOAD_CELL_ADC_ERROR, ( a1 | a2 | b1 | b2 ) ) // TODO DEBUG_DENALI } // TODO use ALARM_ID_DG_LOAD_CELL_FPGA_READ_ERROR for read error