Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -rdc8530d1b15e4b1199cacf0284dbe8f7802e9dde -r7c73db9d00db93c5374fc0fbbe61117e589e95a2 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision dc8530d1b15e4b1199cacf0284dbe8f7802e9dde) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 7c73db9d00db93c5374fc0fbbe61117e589e95a2) @@ -62,7 +62,7 @@ static F32 dilutionLevelPct = 0.0; ///< Reservoir dilution level. static DG_OP_MODE_T dgOpMode = DG_MODE_INIT; ///< DG operation mode. static U32 dgSubMode = 0; ///< DG operation submode. -static U32 timeReservoirInUseMS = 0; ///< Reservoir time in use in milliseconds. +static U32 timeReservoirInUse = 0; ///< Reservoir time in use in milliseconds. static F32 volSpentUFML = 0.0; ///< Ultrafiltration volume in milliliters. static DG_RESERVOIR_ID_T activeReservoir; ///< Active reservoir. static F32 recirculationLevelPct = 0.0; ///< Recirculation level in percent. @@ -104,7 +104,7 @@ * @details Inputs: none * @details Outputs: reservoirsState, timeStartMS, timeDepletionMS, volTotalMl, * volSpentMl, reservoirsPublicationCounter, dilutionLevelPct, dgOpMode, dgSubMode, - * timeReservoirInUseMS, volSpentUFML, activeReservoir, recirculationLevelPct, + * timeReservoirInUse, volSpentUFML, activeReservoir, recirculationLevelPct, * reservoirSwitchStartTimeMS, timeWaitToFillMS, targetFillFlowLPM, ratios * previousDialysateFlowRate * @return none @@ -120,7 +120,7 @@ dilutionLevelPct = 0.0; dgOpMode = DG_MODE_INIT; dgSubMode = 0; - timeReservoirInUseMS = 0; + timeReservoirInUse = 0; volSpentUFML = 0.0; activeReservoir = DG_RESERVOIR_1; recirculationLevelPct = 0.0; @@ -178,7 +178,8 @@ if ( TREATMENT_DIALYSIS_STATE == getTreatmentState()) { - ++timeReservoirInUseMS; + + ++timeReservoirInUse; } } @@ -247,13 +248,13 @@ static void checkReservoirDepletionTime( void ) { // Check if the time that the reservoir has been use has exceeded the limit - if ( timeReservoirInUseMS >= RESERVOIR_DEPLETION_INTERVAL ) + if ( timeReservoirInUse >= RESERVOIR_DEPLETION_INTERVAL ) { #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_RESERVOIRS_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_DEPLETION_TIME_OUT, timeReservoirInUseMS ) + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_DEPLETION_TIME_OUT, (timeReservoirInUse * TASK_GENERAL_INTERVAL) ) } } } @@ -658,7 +659,7 @@ setFinalReservoirVolume(); // Switched the active reservoir so reset the reservoir in use timer - timeReservoirInUseMS = 0; + timeReservoirInUse = 0; // Reset to start state to restart drain, fill, switch process. state = TREATMENT_RESERVOIR_MGMT_START_STATE;