Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r6419179374edcd65da462de84e8aeaefb7e20320 -r7bbf1fb04f7e4788c3072ca173413ed052c608d3 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 6419179374edcd65da462de84e8aeaefb7e20320) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 7bbf1fb04f7e4788c3072ca173413ed052c608d3) @@ -16,13 +16,14 @@ ***************************************************************************/ #include "DialInFlow.h" +#include "Dialysis.h" #include "DGDefs.h" +#include "DGInterface.h" #include "ModeInitPOST.h" #include "ModeTreatment.h" #include "OperationModes.h" #include "SystemCommMessages.h" #include "Timers.h" -#include "DGInterface.h" /** * @addtogroup DGInterface @@ -670,7 +671,7 @@ loadCellWeightInGrams[ LOAD_CELL_RESERVOIR_2_PRIMARY ].data = res2Primary; loadCellWeightInGrams[ LOAD_CELL_RESERVOIR_2_BACKUP ].data = res2Backup; - // feed new weight samples into filters and update moving averages + // Feed new weight samples into filters and update moving averages for ( res = DG_RESERVOIR_1; res < NUM_OF_DG_RESERVOIRS; res++ ) { F32 wt = ( res == DG_RESERVOIR_1 ? res1Primary : res2Primary ); @@ -680,6 +681,9 @@ lgFilteredReservoirWeightInGrams[ res ] = lgLoadCellReadingsTotal[ res ] / (F32)SIZE_OF_LARGE_LOAD_CELL_AVG; } lgLoadCellReadingsIdx = INC_WRAP( lgLoadCellReadingsIdx, 0, SIZE_OF_LARGE_LOAD_CELL_AVG - 1 ); + + // Update Dialysis sub-mode with new reservoir volumes + updateReservoirVolumes( res1Primary, res2Primary ); } /*********************************************************************//**