Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r58afeb5a318882fa028894b51aefba526b2fb1f0 -rc7890e8beda1708d2dea0762dcc40ca5a12222e3 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 58afeb5a318882fa028894b51aefba526b2fb1f0) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision c7890e8beda1708d2dea0762dcc40ca5a12222e3) @@ -420,7 +420,7 @@ filterDialInFlowReadings( 0.0 ); if ( TRUE == isDGCommunicating() ) { - activateAlarmNoData( ALARM_ID_HD_DIALYSATE_FLOW_DATA_NOT_RECEIVE ); + //activateAlarmNoData( ALARM_ID_HD_DIALYSATE_FLOW_DATA_NOT_RECEIVE ); // DEBUG_DENALI for testing only } } } Index: firmware/App/HDCommon.h =================================================================== diff -u -rb3375bb1bc7910b7f45922d2eb4e55bb1dcc3c16 -rc7890e8beda1708d2dea0762dcc40ca5a12222e3 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision b3375bb1bc7910b7f45922d2eb4e55bb1dcc3c16) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision c7890e8beda1708d2dea0762dcc40ca5a12222e3) @@ -56,7 +56,7 @@ #define DISABLE_PUMP_DIRECTION_CHECKS 1 // Do not error on HD pump direction checks #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality #define ALWAYS_ALLOW_SYRINGE_PUMP_CMDS 1 // Allow syringe pump commands at any time except when pump is busy -// #define DISABLE_PRESSURE_CHECKS 1 // Do not error on HD pressure checks + #define DISABLE_PRESSURE_CHECKS 1 // Do not error on HD pressure checks // #define DISABLE_UF_ALARMS 1 // Do not error on HD ultrafiltration checks #define DISABLE_DIALYSATE_TEMP_CHECK 1 // Disable dialysate temperature check // #define DISABLE_VALVE_ALARMS 1 // Do not error on HD valve position @@ -75,7 +75,7 @@ #define ALLOW_1_MIN_TREATMENT_DURATION 1 // Allow user to change treatment duration to as low as 1 minute #define DISABLE_SYRINGE_PUMP_ALARMS 1 // Disable some syringe pump alarms that are triggering intermittently // #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps -// #define DISABLE_BUBBLE_ALARMS 1 // Disable bubble alarms + #define DISABLE_BUBBLE_ALARMS 1 // Disable bubble alarms #define DISABLE_UI_POST_TEST 1 // Disable the UI POST // #define DISABLE_UI_COMM_TO_ALARM 1 // Disable UI comm timeouts #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r9a45dcbdfae33fc06479d99b8d52bada8f682194 -rc7890e8beda1708d2dea0762dcc40ca5a12222e3 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 9a45dcbdfae33fc06479d99b8d52bada8f682194) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision c7890e8beda1708d2dea0762dcc40ca5a12222e3) @@ -25,12 +25,10 @@ #define MAX_RESERVOIR_DEPLETION_TIME_MS ( 30 * SEC_PER_MIN * MS_PER_SECOND ) ///< Maximum allowed depletion time in milliseconds. #define RESERVOIR_DATA_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the reservoir data is published on the CAN bus. -#define DIALYSATE_FLOW_RATE_100_ML_PER_MIN 0.1 ///< Dialysate flow rate 100 mL/min. #define DIALYSATE_FLOW_RATE_350_ML_PER_MIN 0.35 ///< Dialysate flow rate 350 mL/min. #define DIALYSATE_FLOW_RATE_400_ML_PER_MIN 0.4 ///< Dialysate flow rate 400 mL/min. #define DIALYSATE_FLOW_RATE_500_ML_PER_MIN 0.5 ///< Dialysate flow rate 500 mL/min. #define DIALYSATE_FLOW_RATE_550_ML_PER_MIN 0.55 ///< Dialysate flow rate 550 mL/min. -#define DIALYSATE_FLOW_RATE_600_ML_PER_MIN 0.6 ///< Dialysate flow rate 600 mL/min. #define TGT_FILL_FLOW_FOR_DIA_FLOW_100_TO_350_ML_PER_MIN 0.5 ///< Target fill flow rate for dialysate flow rates in between 100 to 350 mL/min. #define TGT_FILL_FLOW_FOR_DIA_FLOW_550_TO_600_ML_PER_MIN 0.8 ///< Target fill flow rate for dialysate flow rates in between 500 to 600 mL/min. @@ -56,7 +54,6 @@ static TREATMENT_RESERVOIR_MGMT_STATE_T reservoirsState; ///< Treatment mode's reservoirs state. static U32 timeStartMS = 0; ///< Active reservoir start time in milliseconds. static U32 timeDepleteMS = 0; ///< Active reservoir depletion time in milliseconds. -static F32 volTotalML = 0.0; ///< Active reservoir total volume in milliliters. static F32 volSpentML = 0.0; ///< Active reservoir spent volume in milliliters. static U32 reservoirPublicationCounter = 0; ///< Reservoirs data publication timer counter. static F32 dilutionLevel = 0.0; @@ -103,7 +100,6 @@ reservoirsState = TREATMENT_RESERVOIR_MGMT_START_STATE; timeStartMS = 0; timeDepleteMS = 0; - volTotalML = 0.0; volSpentML = 0.0; reservoirPublicationCounter = 0; } @@ -224,23 +220,20 @@ F32 dialysateFlow = getDGDialysateFlowRateLMin(); - if ( ( dialysateFlow >= DIALYSATE_FLOW_RATE_100_ML_PER_MIN ) && ( dialysateFlow <= DIALYSATE_FLOW_RATE_350_ML_PER_MIN ) ) + if ( dialysateFlow <= DIALYSATE_FLOW_RATE_350_ML_PER_MIN ) { fillFlowRate = TGT_FILL_FLOW_FOR_DIA_FLOW_100_TO_350_ML_PER_MIN; } else if ( ( dialysateFlow >= DIALYSATE_FLOW_RATE_400_ML_PER_MIN ) && ( dialysateFlow <= DIALYSATE_FLOW_RATE_500_ML_PER_MIN ) ) { + // fill flow = 10 x dialysate_flow ^ 2 - 7.5 x dialysate_flow + 2.0 fillFlowRate = pow( dialysateFlow, 2 ) * DIA_FLOW_TO_FILL_FLOW_SECOND_ORDER_COEFF - dialysateFlow * DIA_FLOW_TO_FILL_FLOW_FIRST_ORDER_COEFF + DIA_FLOW_TO_FILL_FLOW_CONSTANT; } - else if ( ( dialysateFlow >= DIALYSATE_FLOW_RATE_550_ML_PER_MIN ) && ( dialysateFlow <= DIALYSATE_FLOW_RATE_600_ML_PER_MIN ) ) + else if ( dialysateFlow >= DIALYSATE_FLOW_RATE_550_ML_PER_MIN ) { fillFlowRate = TGT_FILL_FLOW_FOR_DIA_FLOW_550_TO_600_ML_PER_MIN; } - else - { - // TODO fault if the flow is not in range? - } return fillFlowRate; } Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r9a45dcbdfae33fc06479d99b8d52bada8f682194 -rc7890e8beda1708d2dea0762dcc40ca5a12222e3 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 9a45dcbdfae33fc06479d99b8d52bada8f682194) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c7890e8beda1708d2dea0762dcc40ca5a12222e3) @@ -6795,6 +6795,8 @@ DG_MIXING_RATIOS_T payload; memcpy( &payload, message->payload, sizeof( DG_MIXING_RATIOS_T ) ); + + setDGMixingRatios( payload ); } }