Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r9848d793638e2f613678e60ea7c0f1e7bc31d9eb -r94dab74a6432263dc4569e0cf8f9fa0b01bf1917 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 9848d793638e2f613678e60ea7c0f1e7bc31d9eb) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 94dab74a6432263dc4569e0cf8f9fa0b01bf1917) @@ -7,13 +7,15 @@ * * @file DGInterface.c * -* @author (last) Dara Navaei -* @date (last) 03-Apr-2022 +* @author (last) Michael Garthwaite +* @date (last) 08-Aug-2022 * * @author (original) Sean * @date (original) 08-Apr-2020 * ***************************************************************************/ + +#include // To check for NaN #include "DialInFlow.h" #include "Dialysis.h" @@ -482,6 +484,12 @@ *************************************************************************/ void setDialysateFlowData( F32 flowRate ) { + // Check if the sent value by DG is a NaN + if ( isnan( flowRate ) ) + { + flowRate = 0.0; + } + dgDialysateFlowRateMlMin = flowRate; dgDialysateFlowDataFreshFlag = TRUE; } @@ -864,6 +872,19 @@ /*********************************************************************//** * @brief + * The cmdSetDGToServiceMode function sends a request to DG to transition + * to service mode. + * @details Inputs: none + * @details Outputs: none + * @return none + *************************************************************************/ +void cmdSetDGToServiceMode( void ) +{ + sendDGServiceModeRequest(); +} + +/*********************************************************************//** + * @brief * The handleDGCommandResponse function processes the latest DG command response. * @details Inputs: none * @details Outputs: process command response from DG