Index: firmware/.ccsproject =================================================================== diff -u -reff7b1575f008f81b29ef906f6346fac6012d3ab -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/.ccsproject (.../.ccsproject) (revision eff7b1575f008f81b29ef906f6346fac6012d3ab) +++ firmware/.ccsproject (.../.ccsproject) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -12,5 +12,5 @@ - + Index: firmware/App/Controllers/DrainPump.c =================================================================== diff -u -r96b5f969bbba7b44593c85c8ac003be0a2d87151 -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision 96b5f969bbba7b44593c85c8ac003be0a2d87151) +++ firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -665,7 +665,7 @@ F32 drainPumpOutletPressurePSI = getMeasuredDGPressure( PRESSURE_SENSOR_DRAIN_PUMP_OUTLET ); F32 roPumpOutletPressurePSI = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET ); F32 targetROFlowLPM = getDrainPumpTargetOutletFlowLPM(); - F32 msrdROFlowLPM = getMeasuredFlowRateLPM( RO_FLOW_SENSOR ); + F32 msrdROFlowLPM = getMeasuredROFlowRateWithConcPumpsLPM(); F32 flowSubLPM = msrdROFlowLPM - targetROFlowLPM; if ( TRUE == isDrainPumpControlInFlowMode ) Index: firmware/App/Modes/ModeFill.c =================================================================== diff -u -rde9afc922d50eb0328cd107d7e03540a648b1f5b -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision de9afc922d50eb0328cd107d7e03540a648b1f5b) +++ firmware/App/Modes/ModeFill.c (.../ModeFill.c) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -828,6 +828,8 @@ F32 acidNormalConductivity = acid.acidConcentrate[ CAL_DATA_ACID_CONCENTRATE_1 ].acidConductivityUSPerCM; F32 bicarbNormalConductivity = bicarb.bicarbConcentrate[ CAL_DATA_BICARB_CONCENTRATE_1 ].bicarbConductivityUSPerCM; + SEND_EVENT_WITH_2_F32_DATA( DG_EVENT_AVG_DIALYSATE_FILL_COND_VALUES, avgAcidConductivity, avgBicarbConductivity ) + // Check RO filter #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_RO_RATIO_CHECK ) != SW_CONFIG_ENABLE_VALUE ) Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r32cd194d3751a7e7a4d0d0b43d76a4707fdd4e8c -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 32cd194d3751a7e7a4d0d0b43d76a4707fdd4e8c) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -1095,4 +1095,28 @@ return result; } +/*********************************************************************//** + * @brief + * The testSetDialysateMixingRatios function sets the acid and bicarb + * dialysate mixing ratios. + * @details Inputs: none + * @details Outputs: acidConcentrateCalRecord, bicarbConcentrateCalRecord + * @param acid which is the acid dialysate mixing ratio + * @param bicarb which is the bicarb dialysate mixing ratio + * @return TRUE if tare successful, FALSE if not + *************************************************************************/ +BOOL testSetDialysateMixingRatios( F32 acid, F32 bicarb ) +{ + BOOL result = FALSE; + + if ( TRUE == isTestingActivated() ) + { + result = TRUE; + acidConcentrateCalRecord.acidConcentrate[ CAL_DATA_ACID_CONCENTRATE_1 ].acidConcMixRatio = acid; + bicarbConcentrateCalRecord.bicarbConcentrate[ CAL_DATA_BICARB_CONCENTRATE_1 ].bicarbConcMixRatio = bicarb; + } + + return result; +} + /**@}*/ Index: firmware/App/Services/Reservoirs.h =================================================================== diff -u -r6499ea25921fcf67826fa0c35bb03caf411ba542 -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision 6499ea25921fcf67826fa0c35bb03caf411ba542) +++ firmware/App/Services/Reservoirs.h (.../Reservoirs.h) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -142,7 +142,8 @@ BOOL testResetReservoirFillVolumeMlOverride( void ); BOOL testSetReservoirDrainVolumeMlOverride( U32 value ); BOOL testResetReservoirDrainVolumeMlOverride( void ); -BOOL testTareReservoir( U32 value ); +BOOL testTareReservoir( U32 value ); +BOOL testSetDialysateMixingRatios( F32 acid, F32 bicarb ); /**@}*/ Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r96b5f969bbba7b44593c85c8ac003be0a2d87151 -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 96b5f969bbba7b44593c85c8ac003be0a2d87151) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -1282,6 +1282,10 @@ break; #endif + case MSG_ID_DG_SET_DIALYSATE_MIXING_RATIOS: + handleTestDGSetDialysateMixingRatios( message ); + break; + default: // TODO - unrecognized message ID received - ignore break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r96b5f969bbba7b44593c85c8ac003be0a2d87151 -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 96b5f969bbba7b44593c85c8ac003be0a2d87151) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -4436,4 +4436,35 @@ } #endif +/*********************************************************************//** + * @brief + * The handleTestDGSetDialysateMixingRatios function handles a request + * to set the dialysate mixing ratios. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleTestDGSetDialysateMixingRatios( MESSAGE_T *message ) +{ + BOOL status = FALSE; + U08* payloadPtr = message->payload; + + if ( message->hdr.payloadLen >= ( 2 * sizeof(F32) ) ) + { + F32 acidMixingRatio = 0.0F; + F32 bicarbMixingRatio = 0.0F; + + memcpy(&acidMixingRatio, payloadPtr, sizeof(F32)); + payloadPtr += sizeof(F32); + + memcpy(&bicarbMixingRatio, payloadPtr, sizeof(F32)); + + status = testSetDialysateMixingRatios( acidMixingRatio, bicarbMixingRatio ); + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + /**@}*/ Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rb549cc9586c585902f891e1aac5e59b7de445f71 -recc3eef231cd2527274969e057d9b4763caa273f --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision b549cc9586c585902f891e1aac5e59b7de445f71) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision ecc3eef231cd2527274969e057d9b4763caa273f) @@ -462,6 +462,9 @@ void handleTestDGNelsonDisinfectSupport( MESSAGE_T *message ); #endif +// MSG_ID_DG_SET_DIALYSATE_MIXING_RATIOS +void handleTestDGSetDialysateMixingRatios( MESSAGE_T *message ); + /**@}*/ #endif