Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r9a96522e0a94724a13c2c9c8f60cf8d18ebde218 -r1cfa9cbcd9ae84a8df767c7777ff3beca067aaa8 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 9a96522e0a94724a13c2c9c8f60cf8d18ebde218) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 1cfa9cbcd9ae84a8df767c7777ff3beca067aaa8) @@ -57,13 +57,15 @@ static const U32 DIP_RESERVOIRS_DATA_MESSAGE_ALARM_THRESHOLD = ((2 * MS_PER_SECOND) / TASK_GENERAL_INTERVAL); static const U32 DIP_DG_OP_MODE_DATA_MESSAGE_ALARM_THRESHOLD = ((2 * MS_PER_SECOND) / TASK_GENERAL_INTERVAL); +// ********** private data ********** + // DG status static DG_OP_MODE_T dgCurrentOpMode; ///< Current DG operation mode. static U32 dgSubMode; ///< Current state (sub-mode) of current DG operation mode. static BOOL dgStartCommandSent; ///< Flag indicates command to start DG has been sent. static BOOL dgStarted; ///< Flag indicates whether we have commanded the DG to start or stop. static BOOL dgTrimmerHeaterOn; ///< Flag indicates whether we have commanded the DG to start or stop the trimmer heater. - + // State machine states static U32 timeStartMS = 0; // TODO is this needed? @@ -505,7 +507,7 @@ * The setDGOpMode function sets the latest DG operating mode reported by * the DG. * @details Inputs: none - * @details Outputs: dgCurrentOpMode, dgSubMode + * @details Outputs: dgCurrentOpMode, dgSubMode, dgOpModeDataFreshFlag * @param opMode operating mode reported by DG * @param subMode sub-mode (current state) of operating mode reported by DG * @return none @@ -530,7 +532,8 @@ * The setDialysateTemperatureReadings function sets the latest dialysate * temperatures reported by the DG. * @details Inputs: none - * @details Outputs: dgDialysateTemp, dgRedundantDialysateTemp + * @details Outputs: dgDialysateTemp, dgRedundantDialysateTemp, + * dgDialysateTemperatureDataFreshFlag * @param temp1 dialysate temperature reported by DG * @param temp2 redundant dialysate temperature reported by DG * @return none @@ -548,7 +551,8 @@ * The setDGReservoirsData function sets the latest reservoir data * reported by the DG. * @details Inputs: none - * @details Outputs: dgActiveReservoir, dgReservoirFillVolumeTarget, dgReservoirDrainVolumeTarget + * @details Outputs: dgActiveReservoir, dgReservoirFillVolumeTarget, + * dgReservoirDrainVolumeTarget, dgReservoirsDataFreshFlag * @param resID ID of active reservoir * @param fillVol Reservoir fill to volume reported by DG * @param drainVol Reservoir drain to volume reported by DG @@ -575,7 +579,7 @@ * The setDialysateFlowData function sets the latest dialysate flow rate * and its freshness status. The dialysate flow data is reported by the DG. * @details Inputs: none - * @details Outputs: dgDialysateFlowRateMlMin + * @details Outputs: dgDialysateFlowRateMlMin, dgDialysateFlowDataFreshFlag * @param flowRate latest dialysate flow rate (mL/min) reported by DG * @return none *************************************************************************/ @@ -598,7 +602,8 @@ * every 100 ms. * @details Inputs: none * @details Outputs: loadCellWeightInGrams[], smFilteredReservoirWeightInGrams[], - * lgFilteredReservoirWeightInGrams[] + * lgFilteredReservoirWeightInGrams[], lgLoadCellReadingsTotal[], + * lgLoadCellBackupReadingsTotal[], lgLoadCellReadingsIdx, dgLoadCellDataFreshFlag * @param res1Primary New weight from primary load cell of reservoir 1 * @param res1Backup New weight from backup load cell of reservoir 1 * @param res2Primary New weight from primary load cell of reservoir 2 @@ -1152,7 +1157,7 @@ * @brief * The checkDGTrimmerHeaterStatus function checks to see the status of the * trimmer heater and set them according to the status of the trimmer heater flag. - * @details Inputs: dgTrimmerHeaterOn + * @details Inputs: dgTrimmerHeaterOn, dgHeatersData * @details Outputs: none * @return none *************************************************************************/