Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -ra2c32d4d221603054ca9ad7a097112caebf08c4e -rcea079b61dbd17b2ddaec99b1124248147d14e72 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision a2c32d4d221603054ca9ad7a097112caebf08c4e) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision cea079b61dbd17b2ddaec99b1124248147d14e72) @@ -59,7 +59,7 @@ F32 smallFilteredWeight; ///< Load cell small filtered (100 100Hz raw sample) weight. F32 largeFilterReadings[ SIZE_OF_LARGE_LOAD_CELL_AVG ]; ///< Load cell samples for large load cell moving average. - F32 largeFilterTotal; ///< Large filter rolling total - used to calc small load cell moving average. + F64 largeFilterTotal; ///< Large filter rolling total - used to calc small load cell moving average. F32 largeFilteredWeight; ///< Load cell large filtered (40 10Hz filtered sample) weight. } LOADCELL_T; @@ -219,7 +219,7 @@ loadcells[ ii ].largeFilterTotal -= loadcells[ ii ].largeFilterReadings[ largeReadingsIdx ]; loadcells[ ii ].largeFilterReadings[ largeReadingsIdx ] = loadcells[ ii ].smallFilteredWeight; loadcells[ ii ].largeFilterTotal += loadcells[ ii ].smallFilteredWeight; - loadcells[ ii ].largeFilteredWeight = loadcells[ ii ].largeFilterTotal / (F32)SIZE_OF_LARGE_LOAD_CELL_AVG; + loadcells[ ii ].largeFilteredWeight = (F32)( loadcells[ ii ].largeFilterTotal / (F64)SIZE_OF_LARGE_LOAD_CELL_AVG ); } loadCellFilterTimerCount = 0;