Index: firmware/App/Services/TDInterface.c =================================================================== diff -u -rbd522c8ffdf75130571e5b6a79d1b1d6acd78b1c -re5c384741feb64828c1f4c32ff6daca07b20f46e --- firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision bd522c8ffdf75130571e5b6a79d1b1d6acd78b1c) +++ firmware/App/Services/TDInterface.c (.../TDInterface.c) (revision e5c384741feb64828c1f4c32ff6daca07b20f46e) @@ -95,6 +95,7 @@ static U32 tdSubMode; ///< Current state (sub-mode) of current TD operation mode. static BOOL tdDialyzerBypass; ///< TD dialyzer bypass static BOOL tdOpModeDataFreshFlag = FALSE; ///< Flag to signal/process fresh TD op mode data +static BOOL tdRxEntered; ///< TRUE when TD has entered treatment Rx (dialysate delivery params) static OVERRIDE_F32_T tdDialysateFlowrate; ///< TD Dialysate flow rate static OVERRIDE_F32_T tdUFRate; ///< TD ultrafiltration rate @@ -123,6 +124,7 @@ tdSubMode = 0U; tdDialyzerBypass = FALSE; tdOpModeDataFreshFlag = FALSE; + tdRxEntered = FALSE; // Initialize treatment parameters from TD tdDialysateFlowrate.data = 0.0F; @@ -320,6 +322,20 @@ /*********************************************************************//** * @brief + * The setTDRxEntered function records whether TD has entered treatment Rx + * parameters (used for PreGen conductivity tolerance bands). + * @details \b Inputs: rxEntered + * @details \b Outputs: tdRxEntered + * @param rxEntered TRUE when treatment Rx has been entered + * @return none + *************************************************************************/ +void setTDRxEntered( BOOL rxEntered ) +{ + tdRxEntered = rxEntered; +} + +/*********************************************************************//** + * @brief * The setTDAcidAndBicarbType function sets the acid and bicarb types to be * used in dialysate generation. * @details \b Inputs: none @@ -400,6 +416,21 @@ return tdDialyzerBypass; } +/*********************************************************************//** + * @brief + * The getTDRxEntered function reports whether TD has entered treatment Rx + * parameters. + * @details \b Inputs: tdRxEntered + * @details \b Outputs: none + * @return TRUE when treatment Rx has been entered + *************************************************************************/ +BOOL getTDRxEntered( void ) +{ + BOOL result = tdRxEntered; + + return result; +} + /****************************************************************************** * @brief * The getTDAcidConversionFactor function gets the latest Acid concentrate @@ -564,6 +595,7 @@ setTDDialyzerBypass( startTxRequest.bypassDialyzer ); tdSubstitutionFlowRate.data = startTxRequest.substitutionRate; setSubstitutionPumpTargetRate( D92_PUMP, getTDSubstitutionFlowRate() ); + setTDRxEntered( TRUE ); // start dialysate generation result = requestDDGenDialStart(); @@ -595,6 +627,7 @@ setTDDialyzerBypass( startTxRequest.bypassDialyzer ); tdSubstitutionFlowRate.data = startTxRequest.substitutionRate; setSubstitutionPumpTargetRate( D92_PUMP, getTDSubstitutionFlowRate() ); + setTDRxEntered( TRUE ); // Signal to update treatement parameters setTreatmentParamUpdate();