Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -re4cc37257141c5227186ac6d8ca3d6c87d009042 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision e4cc37257141c5227186ac6d8ca3d6c87d009042) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -125,7 +125,7 @@ #define PUMP_DIR_ERROR_COUNT_MASK 0x3F ///< Bit mask for pump direction error counter. -#ifdef ENABLE_ALTERNATE_FLOW +#ifndef USE_FMB_FLOW_SENSOR #define BLOOD_PC2 -0.0000090267 ///< Pressure compensation coefficient (2nd order) for blood pump. #define BLOOD_PC1 -0.00071147 ///< Pressure compensation coefficient (1st order) for blood pump. #define BLOOD_NSV 3.4555 ///< Nominal stroke (1/2 rotor revolution) volume (in mL) for blood pump. @@ -188,16 +188,6 @@ static OVERRIDE_F32_T adcBloodPumpMCSpeedRPM = { 0.0, 0.0, 0.0, 0 }; ///< Measured blood pump motor controller speed. static OVERRIDE_F32_T adcBloodPumpMCCurrentmA = { 0.0, 0.0, 0.0, 0 }; ///< Measured blood pump motor controller current. static OVERRIDE_F32_T bloodFlowSignalStrength = { 0.0, 0.0, 0.0, 0 }; ///< Measured blood flow signal strength (%). -#ifdef ENABLE_ALTERNATE_FLOW - static F32 calcBloodFlowRate = 0.0; ///< Calculated blood flow rate from pump speed and upstream pressure. - - static F32 bloodPCSV; ///< Calculated pressure corrected blood pump stroke volume. - static F32 bloodSCSV; ///< Calculated speed corrected blood pump stroke volume. - static F32 bloodPSCSV; ///< Calculated additional pressure corrected blood pump stroke volume. - static F32 bloodHSWF; ///< High speed weighting factor for blood pump stroke volume calculation. - static F32 bloodLSWF; ///< Low speed weighting factor for blood pump stroke volume calculation. - static F32 bloodPSCSVT; ///< Pressure corrected, speed corrected blood pump stroke volume with weighted transition. -#endif static U32 bpControlTimerCounter = 0; ///< Determines when to perform control on blood flow @@ -222,7 +212,16 @@ #ifndef DISABLE_PUMP_FLOW_CHECKS static U08 lastBloodFlowCommErrorCount = 0; ///< Previous BP flow sensor comm error count. #endif +#ifndef USE_FMB_FLOW_SENSOR +static F32 bloodPCSV; ///< Calculated pressure corrected blood pump stroke volume. +static F32 bloodSCSV; ///< Calculated speed corrected blood pump stroke volume. +static F32 bloodPSCSV; ///< Calculated additional pressure corrected blood pump stroke volume. +static F32 bloodHSWF; ///< High speed weighting factor for blood pump stroke volume calculation. +static F32 bloodLSWF; ///< Low speed weighting factor for blood pump stroke volume calculation. +static F32 bloodPSCSVT; ///< Pressure corrected, speed corrected blood pump stroke volume with weighted transition. +#else static HD_FLOW_SENSORS_CAL_RECORD_T bloodFlowCalRecord; ///< Blood flow sensor calibration record. +#endif // ********** private function prototypes ********** @@ -244,19 +243,20 @@ static void checkBloodPumpFlowAgainstSpeed( void ); static void checkBloodPumpMCCurrent( void ); static void checkBloodFlowSensorSignalStrength( void ); -static BOOL processCalibrationData( void ); -#ifdef ENABLE_ALTERNATE_FLOW -static void calcBloodFlow( void ); +#ifdef USE_FMB_FLOW_SENSOR +static BOOL processCalibrationData( void ); +#else +static F32 calcBloodFlow( void ); /*********************************************************************//** * @brief * The calcBloodFlow function calculates an estimated blood flow rate from * blood pump speed and arterial pressure. * @details Inputs: BP set speed, arterial pressure * @details Outputs: calcBloodFlowRate - * @return none + * @return calculated blood flow rate (mL/min) *************************************************************************/ -static void calcBloodFlow( void ) +static F32 calcBloodFlow( void ) { F32 artPres = getLongFilteredArterialPressure(); F32 artPres_2 = pow( artPres, 2.0 ); @@ -274,7 +274,7 @@ bloodPSCSVT = bloodLSWF * bloodPCSV + bloodHSWF * bloodPSCSV; // Blood flow = stroke speed (strokes/min) x stroke volume (mL/stroke) = mL/min - calcBloodFlowRate = strokeSpd * bloodPSCSVT; + return ( strokeSpd * bloodPSCSVT ); } #endif @@ -509,28 +509,25 @@ *************************************************************************/ void execBloodFlowMonitor( void ) { - // Check if a new calibration is available - if ( TRUE == isNewCalibrationRecordAvailable() ) - { - // Get the new calibration data and check its validity - processCalibrationData(); - } - HD_OP_MODE_T opMode = getCurrentOperationMode(); U16 bpRPM = getIntADCReading( INT_ADC_BLOOD_PUMP_SPEED ); U16 bpmA = getIntADCReading( INT_ADC_BLOOD_PUMP_MOTOR_CURRENT ); U08 fpReadCtr = getFPGABloodFlowFastPacketReadCounter(); U08 spReadCtr = getFPGABloodFlowSlowPacketReadCounter(); U08 flowErrorCtr = getFPGABloodFlowErrorCounter(); U08 flowStatus = getFPGABloodFlowMeterStatus(); - + F32 bpFlow; +#ifdef USE_FMB_FLOW_SENSOR F32 fpgaBloodFlow = getFPGABloodFlow(); - F32 bpFlow = pow(fpgaBloodFlow, 4) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].fourthOrderCoeff + - pow(fpgaBloodFlow, 3) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].thirdOrderCoeff + - pow(fpgaBloodFlow, 2) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].secondOrderCoeff + - fpgaBloodFlow * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].gain + - bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].offset; + // Check if a new calibration is available + if ( TRUE == isNewCalibrationRecordAvailable() ) + { + // Get the new calibration data and check its validity + processCalibrationData(); + } +#endif + #ifndef DISABLE_PUMP_FLOW_CHECKS if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_FLOW_SENSOR_ERROR, ( flowErrorCtr != lastBloodFlowCommErrorCount ) ) ) { @@ -563,7 +560,16 @@ adcBloodPumpMCCurrentmA.data = (F32)(SIGN_FROM_12_BIT_VALUE(bpmA)) * BP_CURRENT_ADC_TO_MA_FACTOR; bloodFlowSignalStrength.data = getFPGABloodFlowSignalStrength(); - filterBloodFlowReadings( bpFlow ); +#ifndef USE_FMB_FLOW_SENSOR + bpFlow = calcBloodFlow(); +#else + bpFlow = pow(fpgaBloodFlow, 4) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].fourthOrderCoeff + + pow(fpgaBloodFlow, 3) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].thirdOrderCoeff + + pow(fpgaBloodFlow, 2) * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].secondOrderCoeff + + fpgaBloodFlow * bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].gain + + bloodFlowCalRecord.hdFlowSensors[ CAL_DATA_HD_BLOOD_FLOW_SENSOR ].offset; +#endif + filterBloodFlowReadings( bpFlow ); // TODO - do we need to filter flow if calculated from filtered pressure? // Calculate blood pump motor speed/direction from hall sensor count updateBloodPumpSpeedAndDirectionFromHallSensors(); @@ -584,10 +590,6 @@ checkBloodFlowSensorSignalStrength(); } -#ifdef ENABLE_ALTERNATE_FLOW - calcBloodFlow(); -#endif - // Publish blood flow data on interval publishBloodFlowData(); } @@ -975,11 +977,7 @@ payload.measRotorSpd = getMeasuredBloodPumpRotorSpeed(); payload.measPumpSpd = getMeasuredBloodPumpSpeed(); payload.measMCSpd = getMeasuredBloodPumpMCSpeed(); -#ifdef ENABLE_ALTERNATE_FLOW - payload.measMCCurr = calcBloodFlowRate; -#else payload.measMCCurr = getMeasuredBloodPumpMCCurrent(); -#endif payload.pwmDC = bloodPumpPWMDutyCyclePctSet * FRACTION_TO_PERCENT_FACTOR; payload.flowSigStrength = getMeasuredBloodFlowSignalStrength() * FRACTION_TO_PERCENT_FACTOR; broadcastData( MSG_ID_BLOOD_FLOW_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&payload, sizeof( BLOOD_PUMP_STATUS_PAYLOAD_T ) ); @@ -1307,6 +1305,7 @@ #endif } +#ifdef USE_FMB_FLOW_SENSOR /*********************************************************************//** * @brief * The processCalibrationData function gets the calibration data and makes @@ -1352,7 +1351,7 @@ return status; } - +#endif /*********************************************************************//** * @brief * The execBloodFlowTest function executes the state machine for the @@ -1362,7 +1361,8 @@ * @return the current state of the BloodFlow self-test. *************************************************************************/ SELF_TEST_STATUS_T execBloodFlowTest( void ) -{ +{ +#ifdef USE_FMB_FLOW_SENSOR SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; U08 const bfmStatus = getFPGABloodFlowMeterStatus(); @@ -1384,6 +1384,9 @@ { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BLOOD_FLOW_STATUS_SELF_TEST_FAILURE, (U32)bfmStatus ); } +#else + SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; +#endif return result; } Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rca8c309dcbb646b3835b7bfb222109b3ef25c7d8 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision ca8c309dcbb646b3835b7bfb222109b3ef25c7d8) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -113,16 +113,12 @@ static OVERRIDE_F32_T arterialPressure = {0.0, 0.0, 0.0, 0 }; ///< Measured arterial pressure. static OVERRIDE_F32_T venousPressure = {0.0, 0.0, 0.0, 0 }; ///< Measured venous pressure. static OVERRIDE_U32_T bloodPumpOcclusion = {0, 0, 0, 0 }; ///< Measured blood pump occlusion pressure. -static OVERRIDE_U32_T dialInPumpOcclusion = {0, 0, 0, 0 }; ///< Measured dialysate inlet pump occlusion pressure. -static OVERRIDE_U32_T dialOutPumpOcclusion = {0, 0, 0, 0 }; ///< Measured dialysate outlet pump occlusion pressure. static F32 longFilteredArterialPressure; ///< Measured arterial pressure after long (10 s) filter. static F32 shortFilteredArterialPressure; ///< Measured arterial pressure after short (1 s) filter. static F32 shortFilteredVenousPressure; ///< Measured venous pressure after short (1 s) filter. #ifndef DISABLE_PRESSURE_CHECKS static U32 bloodPumpOcclusionAfterCartridgeInstall; ///< Measured blood pump occlusion reading taken after cartridge install. -static U32 dialInPumpOcclusionAfterCartridgeInstall; ///< Measured dialysate inlet pump occlusion reading taken after cartridge install. -static U32 dialOutPumpOcclusionAfterCartridgeInstall; ///< Measured dialysate outlet pump occlusion reading taken after cartridge install. #endif static U32 emptySalineBagCtr = 0; ///< Timer counter for empty bag detection. @@ -131,11 +127,7 @@ static U08 lastVenousPressureReadCtr; ///< Previous venous pressure sensor read count. #ifndef DISABLE_PRESSURE_CHECKS static U08 lastBPOcclReadCtr; ///< Previous BP occlusion sensor read count. -static U08 lastDPiOcclReadCtr; ///< Previous DPi occlusion sensor read count. -static U08 lastDPoOcclReadCtr; ///< Previous DPo occlusion sensor read count. static U08 lastBPErrorCtr; ///< Previous BP error count. -static U08 lastDPIErrorCtr; ///< Previous DPi error count. -static U08 lastDPOErrorCtr; ///< Previous DPo error count. #endif static F32 artPressureReadingsLong[ SIZE_OF_LONG_ART_ROLLING_AVG ]; ///< Holds flow samples for long arterial pressure rolling average. @@ -182,16 +174,10 @@ initPersistentAlarm( ALARM_ID_HD_VENOUS_PRESSURE_READ_TIMEOUT_ERROR, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_VENOUS_PRESSURE_SENSOR_TEMP_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPI_OCCLUSON_READ_TIMEOUT_ERROR, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPO_OCCLUSION_READ_TIMEOUT_ERROR, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_BP_OCCLUSION_SENSOR_ERROR, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPI_OCCLUSION_SENSOR_ERROR, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPO_OCCLUSION_SENSOR_ERROR, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_ARTERIAL_PRESSURE_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_VENOUS_PRESSURE_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); initPersistentAlarm( ALARM_ID_HD_BP_OCCLUSION_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPI_OCCLUSION_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); - initPersistentAlarm( ALARM_ID_HD_DPO_OCCLUSION_OUT_OF_RANGE, 0, PRES_ALARM_PERSISTENCE ); lastArterialPressureReadCtr = 0; lastVenousPressureReadCtr = 0; @@ -218,20 +204,17 @@ /*********************************************************************//** * @brief * The isCartridgeLoaded function determines whether a cartridge has been - * properly loaded by looking at the 3 occlusion pressure sensors. - * @details Inputs: occlusion pressures for the pumps + * properly loaded by looking at the BP occlusion pressure sensor. + * @details Inputs: BP occlusion pressure * @details Outputs: none - * @return TRUE if all 3 occlusion sensors read above loaded threshold, FALSE if not. + * @return TRUE if BP occlusion sensor reads above loaded threshold, FALSE if not. *************************************************************************/ BOOL isCartridgeLoaded( void ) { BOOL result = FALSE; U32 bpOccl = getMeasuredBloodPumpOcclusion(); - U32 diOccl = getMeasuredDialInPumpOcclusion(); - U32 doOccl = getMeasuredDialOutPumpOcclusion(); - if ( ( bpOccl >= CARTRIDGE_LOADED_THRESHOLD ) && ( diOccl >= CARTRIDGE_LOADED_THRESHOLD ) && - ( doOccl >= CARTRIDGE_LOADED_THRESHOLD ) ) + if ( bpOccl >= CARTRIDGE_LOADED_THRESHOLD ) { result = TRUE; } @@ -242,18 +225,16 @@ /*********************************************************************//** * @brief * The isCartridgeUnloaded function determines if a cartridge has been - * unloaded by looking at the 3 occlusion pressure sensors. - * @details Inputs: occlusion pressures for the pumps + * unloaded by looking at the BP occlusion pressure sensor. + * @details Inputs: BP occlusion pressure * @details Outputs: none - * @return TRUE if all 3 occlusion sensors read below loaded threshold, FALSE if not. + * @return TRUE if occlusion sensor are below loaded threshold, FALSE if not. *************************************************************************/ BOOL isCartridgeUnloaded( void ) { - BOOL const bpOcclBelowLoadedThreshold = getMeasuredBloodPumpOcclusion() <= CARTRIDGE_LOADED_THRESHOLD; - BOOL const diOcclBelowLoadedThreshold = getMeasuredDialInPumpOcclusion() <= CARTRIDGE_LOADED_THRESHOLD; - BOOL const doOcclBelowLoadedThreshold = getMeasuredDialOutPumpOcclusion() <= CARTRIDGE_LOADED_THRESHOLD; + BOOL const bpOcclBelowLoadedThreshold = ( getMeasuredBloodPumpOcclusion() <= CARTRIDGE_LOADED_THRESHOLD ? TRUE : FALSE ); - return ( bpOcclBelowLoadedThreshold && diOcclBelowLoadedThreshold && doOcclBelowLoadedThreshold ); + return bpOcclBelowLoadedThreshold; } /*********************************************************************//** @@ -287,19 +268,17 @@ /*********************************************************************//** * @brief - * The setOcclusionInstallLevels function sets the occlusion sensor levels + * The setOcclusionInstallLevel function sets the occlusion sensor level * for an installed cartridge. This function should be called after a new * cartridge is installed. - * @details Inputs: bloodPumpOcclusion, dialInPumpOcclusion, dialOutPumpOcclusion - * @details Outputs: bloodPumpOcclusionAfterCartridgeInstall, dialInPumpOcclusionAfterCartridgeInstall, dialOutPumpOcclusionAfterCartridgeInstall + * @details Inputs: bloodPumpOcclusion + * @details Outputs: bloodPumpOcclusionAfterCartridgeInstall * @return none *************************************************************************/ -void setOcclusionInstallLevels( void ) +void setOcclusionInstallLevel( void ) { #ifndef DISABLE_PRESSURE_CHECKS bloodPumpOcclusionAfterCartridgeInstall = getMeasuredBloodPumpOcclusion(); - dialInPumpOcclusionAfterCartridgeInstall = getMeasuredDialInPumpOcclusion(); - dialOutPumpOcclusionAfterCartridgeInstall = getMeasuredDialOutPumpOcclusion(); #endif } @@ -448,55 +427,29 @@ static void convertOcclusionPressures( void ) { U08 bpReadCtr = getFPGABloodPumpOcclusionReadCounter(); - U08 dpiReadCtr = getFPGADialInPumpOcclusionReadCounter(); - U08 dpoReadCtr = getFPGADialOutPumpOcclusionReadCounter(); U08 bpErrorCtr = getFPGABloodPumpOcclusionErrorCounter(); - U08 dpiErrorCtr = getFPGADialInPumpOcclusionErrorCounter(); - U08 dpoErrorCtr = getFPGADialOutPumpOcclusionErrorCounter(); #ifndef DISABLE_PRESSURE_CHECKS // Check for sensor errors if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_OCCLUSION_SENSOR_ERROR, ( bpErrorCtr != lastBPErrorCtr ) ) ) { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BP_OCCLUSION_SENSOR_ERROR, (U32)bpErrorCtr ) } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DPI_OCCLUSION_SENSOR_ERROR, ( dpiErrorCtr != lastDPIErrorCtr ) ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DPI_OCCLUSION_SENSOR_ERROR, (U32)dpiErrorCtr ) - } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DPO_OCCLUSION_SENSOR_ERROR, ( dpoErrorCtr != lastDPOErrorCtr ) ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DPO_OCCLUSION_SENSOR_ERROR, (U32)dpoErrorCtr ) - } // Check for stale occlusion reads if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR, ( bpReadCtr == lastBPOcclReadCtr ) ) ) { activateAlarmNoData( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR ); } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR, ( dpiReadCtr == lastDPiOcclReadCtr ) ) ) - { - activateAlarmNoData( ALARM_ID_HD_DPI_OCCLUSON_READ_TIMEOUT_ERROR ); - } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR, ( dpoReadCtr == lastDPoOcclReadCtr ) ) ) - { - activateAlarmNoData( ALARM_ID_HD_DPO_OCCLUSION_READ_TIMEOUT_ERROR ); - } #endif // Record occlusion sensor readings bloodPumpOcclusion.data = (U32)getFPGABloodPumpOcclusion(); - dialInPumpOcclusion.data = (U32)getFPGADialInPumpOcclusion(); - dialOutPumpOcclusion.data = (U32)getFPGADialOutPumpOcclusion(); #ifndef DISABLE_PRESSURE_CHECKS // Record occlusion read and error counters for next time around lastBPOcclReadCtr = bpReadCtr; - lastDPiOcclReadCtr = dpiReadCtr; - lastDPoOcclReadCtr = dpoReadCtr; lastBPErrorCtr = bpErrorCtr; - lastDPIErrorCtr = dpiErrorCtr; - lastDPOErrorCtr = dpoErrorCtr; #endif } @@ -618,25 +571,15 @@ static void checkOcclusions( void ) { U32 bpOccl = getMeasuredBloodPumpOcclusion(); - U32 diOccl = getMeasuredDialInPumpOcclusion(); - U32 doOccl = getMeasuredDialOutPumpOcclusion(); #ifndef DISABLE_PRESSURE_CHECKS - // Range check occlusion sensors + // Range check occlusion sensor if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_BP_OCCLUSION_OUT_OF_RANGE, bpOccl < MIN_OCCLUSION_COUNTS ) ) { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BP_OCCLUSION_OUT_OF_RANGE, bpOccl ); } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DPI_OCCLUSION_OUT_OF_RANGE, diOccl < MIN_OCCLUSION_COUNTS ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DPI_OCCLUSION_OUT_OF_RANGE, diOccl ); - } - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DPO_OCCLUSION_OUT_OF_RANGE, doOccl < MIN_OCCLUSION_COUNTS ) ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DPO_OCCLUSION_OUT_OF_RANGE, doOccl ); - } - // Check for occlusions + // Check for occlusion if ( bpOccl > ( OCCLUSION_THRESHOLD_OFFSET + bloodPumpOcclusionAfterCartridgeInstall ) ) { signalBloodPumpHardStop(); // Stop pump immediately @@ -646,25 +589,6 @@ { clearAlarmCondition( ALARM_ID_OCCLUSION_BLOOD_PUMP ); } - if ( diOccl > ( OCCLUSION_THRESHOLD_OFFSET + dialInPumpOcclusionAfterCartridgeInstall ) ) - { - signalDialInPumpHardStop(); // Stop pump immediately - cmdStopDGTrimmerHeater(); - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_OCCLUSION_DIAL_IN_PUMP, diOccl ) - } - else if ( diOccl < ( OCCLUSION_CLEAR_THRESHOLD_OFFSET + dialInPumpOcclusionAfterCartridgeInstall ) ) - { - clearAlarmCondition( ALARM_ID_OCCLUSION_DIAL_IN_PUMP ); - } - if ( doOccl > ( OCCLUSION_THRESHOLD_OFFSET + dialOutPumpOcclusionAfterCartridgeInstall ) ) - { - signalDialOutPumpHardStop(); // Stop pump immediately - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_OCCLUSION_DIAL_OUT_PUMP, doOccl ) - } - else if ( doOccl < ( OCCLUSION_CLEAR_THRESHOLD_OFFSET + dialOutPumpOcclusionAfterCartridgeInstall ) ) - { - clearAlarmCondition( ALARM_ID_OCCLUSION_DIAL_OUT_PUMP ); - } #endif } @@ -762,46 +686,6 @@ return result; } -/*********************************************************************//** - * @brief - * The getMeasuredDialInPumpOcclusion function gets the measured dialysate - * inlet pump occlusion pressure. - * @details Inputs: dialInPumpOcclusion - * @details Outputs: none - * @return the current dialysis inlet pump occlusion pressure (in mmHg). - *************************************************************************/ -U32 getMeasuredDialInPumpOcclusion( void ) -{ - U32 result = dialInPumpOcclusion.data; - - if ( OVERRIDE_KEY == dialInPumpOcclusion.override ) - { - result = dialInPumpOcclusion.ovData; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The getMeasuredDialOutPumpOcclusion function gets the measured dialysate - * outlet pump occlusion pressure. - * @details Inputs: dialOutPumpOcclusion - * @details Outputs: none - * @return the current dialysis outlet pump occlusion pressure (in mmHg). - *************************************************************************/ -U32 getMeasuredDialOutPumpOcclusion( void ) -{ - U32 result = dialOutPumpOcclusion.data; - - if ( OVERRIDE_KEY == dialOutPumpOcclusion.override ) - { - result = dialOutPumpOcclusion.ovData; - } - - return result; -} - /*********************************************************************//** * @brief * The filterInlinePressureReadings function adds a new arterial and venous @@ -869,8 +753,8 @@ data.arterialPressure = shortFilteredArterialPressure; data.venousPressure = shortFilteredVenousPressure; data.bldPumpOcclusion = getMeasuredBloodPumpOcclusion(); - data.diPumpOcclusion = getMeasuredDialInPumpOcclusion(); - data.doPumpOcclusion = getMeasuredDialOutPumpOcclusion(); + data.diPumpOcclusion = 0; // TODO - remove unused fields + data.doPumpOcclusion = 0; broadcastData( MSG_ID_PRESSURE_OCCLUSION_DATA, COMM_BUFFER_OUT_CAN_HD_BROADCAST, (U08*)&data, sizeof( PRESSURE_OCCLUSION_DATA_T ) ); presOcclDataPublicationTimerCounter = 0; @@ -888,8 +772,6 @@ { #ifndef DISABLE_PRESSURE_CHECKS U32 const bpPressure = getMeasuredBloodPumpOcclusion(); - U32 const dialysateInPressure = getMeasuredDialInPumpOcclusion(); - U32 const dialysateOutPressure = getMeasuredDialOutPumpOcclusion(); F32 const arterialPressure = getFilteredArterialPressure(); F32 const venousPressure = getFilteredVenousPressure(); @@ -898,16 +780,6 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_BP_OCCLUSION_SELF_TEST_FAILURE, bpPressure ); } - if ( dialysateInPressure > CARTRIDGE_LOADED_THRESHOLD ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DIP_OCCLUSION_SELF_TEST_FAILURE, dialysateInPressure ); - } - - if ( dialysateOutPressure > CARTRIDGE_LOADED_THRESHOLD ) - { - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_DOP_OCCLUSION_SELF_TEST_FAILURE, dialysateOutPressure ); - } - if ( ( arterialPressure <= ARTERIAL_PRESSURE_SELF_TEST_MIN ) || ( arterialPressure >= ARTERIAL_PRESSURE_SELF_TEST_MAX ) ) { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_ARTERIAL_PRESSURE_SELF_TEST_FAILURE, arterialPressure ); @@ -933,36 +805,12 @@ #ifndef DISABLE_OCCLUSION_SELF_TEST U32 const bpPressure = getMeasuredBloodPumpOcclusion(); - U32 const dialysateInPressure = getMeasuredDialInPumpOcclusion(); - U32 const dialysateOutPressure = getMeasuredDialOutPumpOcclusion(); if ( ( bpPressure <= CARTRIDGE_LOADED_THRESHOLD ) || ( bpPressure >= OCCLUSION_CARTRIDGE_LOADED_PRESSURE_READING_MAX ) ) { + activateAlarmNoData( ALARM_ID_NO_CARTRIDGE_LOADED ); result = SELF_TEST_STATUS_FAILED; } - - if ( ( dialysateInPressure <= CARTRIDGE_LOADED_THRESHOLD ) || ( dialysateInPressure >= OCCLUSION_CARTRIDGE_LOADED_PRESSURE_READING_MAX ) ) - { - result = SELF_TEST_STATUS_FAILED; - } - - if ( ( dialysateOutPressure <= CARTRIDGE_LOADED_THRESHOLD ) || ( dialysateOutPressure >= OCCLUSION_CARTRIDGE_LOADED_PRESSURE_READING_MAX ) ) - { - result = SELF_TEST_STATUS_FAILED; - } - - if ( SELF_TEST_STATUS_FAILED == result ) - { - if ( ( bpPressure <= CARTRIDGE_LOADED_THRESHOLD ) && ( dialysateInPressure <= CARTRIDGE_LOADED_THRESHOLD ) && - ( dialysateOutPressure <= CARTRIDGE_LOADED_THRESHOLD ) ) - { - activateAlarmNoData( ALARM_ID_NO_CARTRIDGE_LOADED ); - } - else - { - activateAlarmNoData( ALARM_ID_CARTRIDGE_INSTALLED_IMPROPERLY ); - } - } #endif return result; @@ -1155,94 +1003,4 @@ return result; } -/*********************************************************************//** - * @brief - * The testSetDialInPumpOcclusionOverride function overrides the measured - * dialysate inlet pump occlusion pressure.n - * @details Inputs: none - * @details Outputs: dialInPumpOcclusion - * @param value override measured dialysate inlet pump occlusion pressure - * @return TRUE if override successful, FALSE if not - *************************************************************************/ -BOOL testSetDialInPumpOcclusionOverride( U32 value ) -{ - BOOL result = FALSE; - - if ( TRUE == isTestingActivated() ) - { - result = TRUE; - dialInPumpOcclusion.ovData = value; - dialInPumpOcclusion.override = OVERRIDE_KEY; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The testResetDialInPumpOcclusionOverride function resets the override of the - * measured dialysate inlet pump occlusion pressure. - * @details Inputs: none - * @details Outputs: dialInPumpOcclusion - * @return TRUE if reset successful, FALSE if not - *************************************************************************/ -BOOL testResetDialInPumpOcclusionOverride( void ) -{ - BOOL result = FALSE; - - if ( TRUE == isTestingActivated() ) - { - result = TRUE; - dialInPumpOcclusion.override = OVERRIDE_RESET; - dialInPumpOcclusion.ovData = dialInPumpOcclusion.ovInitData; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The testSetDialOutPumpOcclusionOverride function overrides the measured - * dialysate outlet pump occlusion pressure. - * @details Inputs: none - * @details Outputs: dialOutPumpOcclusion - * @param value override measured dialysate outlet pump occlusion pressure - * @return TRUE if override successful, FALSE if not - *************************************************************************/ -BOOL testSetDialOutPumpOcclusionOverride( U32 value ) -{ - BOOL result = FALSE; - - if ( TRUE == isTestingActivated() ) - { - result = TRUE; - dialOutPumpOcclusion.ovData = value; - dialOutPumpOcclusion.override = OVERRIDE_KEY; - } - - return result; -} - -/*********************************************************************//** - * @brief - * The testResetDialOutPumpOcclusionOverride function resets the override of the - * measured dialysate outlet pump occlusion pressure. - * @details Inputs: none - * @details Outputs: dialOutPumpOcclusion - * @return TRUE if reset successful, FALSE if not - *************************************************************************/ -BOOL testResetDialOutPumpOcclusionOverride( void ) -{ - BOOL result = FALSE; - - if ( TRUE == isTestingActivated() ) - { - result = TRUE; - dialOutPumpOcclusion.override = OVERRIDE_RESET; - dialOutPumpOcclusion.ovData = dialOutPumpOcclusion.ovInitData; - } - - return result; -} - /**@}*/ Index: firmware/App/Controllers/PresOccl.h =================================================================== diff -u -r38a89cb53b4ed2e467f51d41e30d43010fdd23e3 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Controllers/PresOccl.h (.../PresOccl.h) (revision 38a89cb53b4ed2e467f51d41e30d43010fdd23e3) +++ firmware/App/Controllers/PresOccl.h (.../PresOccl.h) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -73,14 +73,12 @@ F32 getMeasuredVenousPressure( void ); F32 getFilteredVenousPressure( void ); U32 getMeasuredBloodPumpOcclusion( void ); -U32 getMeasuredDialInPumpOcclusion( void ); -U32 getMeasuredDialOutPumpOcclusion( void ); BOOL isCartridgeLoaded( void ); BOOL isCartridgeUnloaded( void ); BOOL isSalineBagEmpty( void ); -void setOcclusionInstallLevels( void ); +void setOcclusionInstallLevel( void ); BOOL testSetPresOcclDataPublishIntervalOverride( U32 value ); BOOL testResetPresOcclDataPublishIntervalOverride( void ); @@ -90,10 +88,6 @@ BOOL testResetVenousPressureOverride( void ); BOOL testSetBloodPumpOcclusionOverride( U32 value ); BOOL testResetBloodPumpOcclusionOverride( void ); -BOOL testSetDialInPumpOcclusionOverride( U32 value ); -BOOL testResetDialInPumpOcclusionOverride( void ); -BOOL testSetDialOutPumpOcclusionOverride( U32 value ); -BOOL testResetDialOutPumpOcclusionOverride( void ); /**@}*/ Index: firmware/App/HDCommon.h =================================================================== diff -u -r8f217e3f4f171dba78c9ac69a3470af442941a89 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 8f217e3f4f171dba78c9ac69a3470af442941a89) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -46,9 +46,10 @@ // #define DISABLE_ACCELS 1 // Disable accelerometer POST and monitoring // #define DISABLE_CRC_ERROR 1 // Do not error on bad CRC for CAN messages #define DISABLE_ACK_ERRORS 1 // Do not error on failure of other node(s) to ACK a message + #define USE_FMB_FLOW_SENSOR 1 // Use FMB flow sensor instead of flow estimation from pump speed/pressure/wearing + #define RUN_BP_OPEN_LOOP 1 // Run blood pump in open loop mode #define DISABLE_MOTOR_CURRENT_CHECKS 1 // Do not error on HD pump current checks #define DISABLE_PUMP_FLOW_CHECKS 1 // Do not error on HD pump flow checks - #define ENABLE_ALTERNATE_FLOW 1 // Enable calculation of speed/pressure based flow and publish in lieu of MC motor speed #define DISABLE_PUMP_SPEED_CHECKS 1 // Do not error on HD pump speed checks // #define DISABLE_PUMP_DIRECTION_CHECKS 1 // Do not error on HD pump direction checks #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -re4cc37257141c5227186ac6d8ca3d6c87d009042 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision e4cc37257141c5227186ac6d8ca3d6c87d009042) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -202,7 +202,11 @@ setValvePosition( VBV, VALVE_POSITION_B_OPEN ); // Restart pumps #ifndef RUN_PUMPS_OPEN_LOOP +#ifndef RUN_BP_OPEN_LOOP setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); +#else + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); +#endif setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); #else setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); @@ -289,7 +293,11 @@ if ( ( TREATMENT_DIALYSIS_STATE == getTreatmentState() ) && ( getDialysisState() != DIALYSIS_SALINE_BOLUS_STATE ) ) { #ifndef RUN_PUMPS_OPEN_LOOP +#ifndef RUN_BP_OPEN_LOOP setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); +#else + setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); +#endif setDialInPumpTargetFlowRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); #else setBloodPumpTargetFlowRate( setBloodFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_OPEN_LOOP ); Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -re4cc37257141c5227186ac6d8ca3d6c87d009042 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision e4cc37257141c5227186ac6d8ca3d6c87d009042) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -662,7 +662,7 @@ { if ( submodeCompleteTransitionTimeCounter++ >= SUBMODE_COMPLETE_UI_TRANSITION_TIME_COUNT ) { - setOcclusionInstallLevels(); // Record occlusion pressure levels after a new cartridge is installed. + setOcclusionInstallLevel(); // Record occlusion pressure level after a new cartridge is installed. submodeCompleteTransitionTimeCounter = 0; state = HD_PRE_TREATMENT_PRIME_STATE; transitionToPrime(); Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -re4cc37257141c5227186ac6d8ca3d6c87d009042 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision e4cc37257141c5227186ac6d8ca3d6c87d009042) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -215,8 +215,8 @@ static void setupForRinsebackDelivery( U32 rate ) { // Open VBA and VBV valves to allow flow from saline bag and to patient venous line - setValvePosition( VBA, VALVE_POSITION_B_OPEN ); - setValvePosition( VBV, VALVE_POSITION_B_OPEN ); + setValvePosition( VBA, VALVE_POSITION_C_CLOSE ); // draw from saline back instead of patient + setValvePosition( VBV, VALVE_POSITION_B_OPEN ); // return to patient // Start blood pump at rinseback flow rate setBloodPumpTargetFlowRate( rate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Start air trap leveling control Index: firmware/App/Services/FPGA.c =================================================================== diff -u -r844f98879b7425c207b58562e623ab960adbc357 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision 844f98879b7425c207b58562e623ab960adbc357) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -147,12 +147,12 @@ U16 bloodOcclusionData; ///< Reg 276. Blood pump occlusion sensor data. U08 bloodOcclusionReadCount; ///< Reg 278. Blood pump occlusion sensor read count. U08 bloodOcclusionErrorCount; ///< Reg 279. Blood pump occlusion sensor error count. - U16 dialysateInOcclusionData; ///< Reg 280. Dialysate inlet pump occlusion sensor data. - U08 dialysateInOcclusionReadCount; ///< Reg 282. Dialysate inlet pump occlusion sensor read count. - U08 dialysateInOcclusionErrorCount; ///< Reg 283. Dialysate inlet pump occlusion sensor error count. - U16 dialysateOutOcclusionData; ///< Reg 284. Dialysate outlet pump occlusion sensor data. - U08 dialysateOutOcclusionReadCount; ///< Reg 286. Dialysate outlet pump occlusion sensor read count. - U08 dialysateOutOcclusionErrorCount; ///< Reg 287. Dialysate outlet pump occlusion sensor error count. + U16 obsolete1; ///< Reg 280. Unused. + U08 obsolete2; ///< Reg 282. Unused. + U08 obsolete3; ///< Reg 283. Unused. + U16 obsolete4; ///< Reg 284. Unused. + U08 obsolete5; ///< Reg 286. Unused. + U08 obsolete6; ///< Reg 287. Unused. U16 bloodPumpHallSensorCount; ///< Reg 288. Blood pump hall sensor count. U08 bloodPumpHallSensorStatus; ///< Reg 290. Blood pump hall sensor status. U08 dialInPumpHallSensorStatus; ///< Reg 291. Dialysate inlet pump hall sensor status. @@ -1506,32 +1506,6 @@ /*********************************************************************//** * @brief - * The getFPGADialInPumpOcclusion function gets the latest dialysate - * inlet occlusion reading. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate inlet occlusion reading - *************************************************************************/ -U16 getFPGADialInPumpOcclusion( void ) -{ - return fpgaSensorReadings.dialysateInOcclusionData; -} - -/*********************************************************************//** - * @brief - * The getFPGADialOutPumpOcclusion function gets the latest dialysate - * outlet occlusion reading. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate outlet occlusion reading - *************************************************************************/ -U16 getFPGADialOutPumpOcclusion( void ) -{ - return fpgaSensorReadings.dialysateOutOcclusionData; -} - -/*********************************************************************//** - * @brief * The getFPGABloodPumpOcclusionReadCounter function gets the latest blood * pump occlusion read counter. * @details Inputs: fpgaSensorReadings @@ -1545,32 +1519,6 @@ /*********************************************************************//** * @brief - * The getFPGADialInPumpOcclusionReadCounter function gets the latest dialysate - * inlet pump occlusion read counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate inlet pump occlusion read counter - *************************************************************************/ -U08 getFPGADialInPumpOcclusionReadCounter( void ) -{ - return fpgaSensorReadings.dialysateInOcclusionReadCount; -} - -/*********************************************************************//** - * @brief - * The getFPGADialOutPumpOcclusionReadCounter function gets the latest dialysate - * outlet pump occlusion read counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate outlet pump occlusion read counter - *************************************************************************/ -U08 getFPGADialOutPumpOcclusionReadCounter( void ) -{ - return fpgaSensorReadings.dialysateOutOcclusionReadCount; -} - -/*********************************************************************//** - * @brief * The getFPGABloodPumpOcclusionErrorCounter function gets the latest blood * pump occlusion error counter. * @details Inputs: fpgaSensorReadings @@ -1584,32 +1532,6 @@ /*********************************************************************//** * @brief - * The getFPGADialInPumpOcclusionErrorCounter function gets the latest dialysate - * inlet pump occlusion error counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate inlet pump occlusion error counter - *************************************************************************/ -U08 getFPGADialInPumpOcclusionErrorCounter( void ) -{ - return fpgaSensorReadings.dialysateInOcclusionErrorCount; -} - -/*********************************************************************//** - * @brief - * The getFPGADialOutPumpOcclusionErrorCounter function gets the latest dialysate - * outlet pump occlusion error counter. - * @details Inputs: fpgaSensorReadings - * @details Outputs: none - * @return last dialysate outlet pump occlusion error counter - *************************************************************************/ -U08 getFPGADialOutPumpOcclusionErrorCounter( void ) -{ - return fpgaSensorReadings.dialysateOutOcclusionErrorCount; -} - -/*********************************************************************//** - * @brief * The getFPGAArterialPressure function gets the latest arterial pressure reading. * High byte indicates alarm status for ADC channel. * Low 24-bits are channel reading. Subtract 2^23 from low 24 bits to get Index: firmware/App/Services/FPGA.h =================================================================== diff -u -r844f98879b7425c207b58562e623ab960adbc357 -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Services/FPGA.h (.../FPGA.h) (revision 844f98879b7425c207b58562e623ab960adbc357) +++ firmware/App/Services/FPGA.h (.../FPGA.h) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -89,14 +89,8 @@ U16 getFPGAVenousPressureTemperature( void ); U08 getFPGAVenousPressureReadCounter( void ); U16 getFPGABloodPumpOcclusion( void ); -U16 getFPGADialInPumpOcclusion( void ); -U16 getFPGADialOutPumpOcclusion( void ); U08 getFPGABloodPumpOcclusionReadCounter( void ); -U08 getFPGADialInPumpOcclusionReadCounter( void ); -U08 getFPGADialOutPumpOcclusionReadCounter( void ); U08 getFPGABloodPumpOcclusionErrorCounter( void ); -U08 getFPGADialInPumpOcclusionErrorCounter( void ); -U08 getFPGADialOutPumpOcclusionErrorCounter( void ); void setFPGASyringePumpControlFlags( U08 bitFlags ); void setFPGASyringePumpADCandDACControlFlags( U08 bitFlags ); Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rc62b21415ad7b2a77be6d0b0adf06316d2ccb51b -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision c62b21415ad7b2a77be6d0b0adf06316d2ccb51b) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -1417,14 +1417,6 @@ handleTestBloodPumpOcclusionOverrideRequest( message ); break; - case MSG_ID_OCCLUSION_DIAL_IN_PUMP_OVERRIDE: - handleTestDialysateInletPumpOcclusionOverrideRequest( message ); - break; - - case MSG_ID_OCCLUSION_DIAL_OUT_PUMP_OVERRIDE: - handleTestDialysateOutletPumpOcclusionOverrideRequest( message ); - break; - case MSG_ID_PRES_OCCL_SEND_INTERVAL_OVERRIDE: handleTestPresOcclBroadcastIntervalOverrideRequest( message ); break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc62b21415ad7b2a77be6d0b0adf06316d2ccb51b -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c62b21415ad7b2a77be6d0b0adf06316d2ccb51b) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -4120,70 +4120,6 @@ /*********************************************************************//** * @brief - * The handleTestDialysateInletPumpOcclusionOverrideRequest function handles a request to - * override the dialysate inlet pump occlusion sensor. - * @details Inputs: none - * @details Outputs: message handled - * @param message a pointer to the message to handle - * @return none - *************************************************************************/ -void handleTestDialysateInletPumpOcclusionOverrideRequest( MESSAGE_T *message ) -{ - TEST_OVERRIDE_PAYLOAD_T payload; - BOOL result = FALSE; - - // Verify payload length - if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) - { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); - if ( FALSE == payload.reset ) - { - result = testSetDialInPumpOcclusionOverride( payload.state.u32 ); - } - else - { - result = testResetDialInPumpOcclusionOverride(); - } - } - - // Respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); -} - -/*********************************************************************//** - * @brief - * The handleTestDialysateOutletPumpOcclusionOverrideRequest function handles a request to - * override the dialysate outlet pump occlusion sensor. - * @details Inputs: none - * @details Outputs: message handled - * @param message a pointer to the message to handle - * @return none - *************************************************************************/ -void handleTestDialysateOutletPumpOcclusionOverrideRequest( MESSAGE_T *message ) -{ - TEST_OVERRIDE_PAYLOAD_T payload; - BOOL result = FALSE; - - // Verify payload length - if ( sizeof(TEST_OVERRIDE_PAYLOAD_T) == message->hdr.payloadLen ) - { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_PAYLOAD_T) ); - if ( FALSE == payload.reset ) - { - result = testSetDialOutPumpOcclusionOverride( payload.state.u32 ); - } - else - { - result = testResetDialOutPumpOcclusionOverride(); - } - } - - // Respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); -} - -/*********************************************************************//** - * @brief * The handleTestPresOcclBroadcastIntervalOverrideRequest function handles a request to * override the broadcast interval for pressure/occlusion data. * @details Inputs: none Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rc62b21415ad7b2a77be6d0b0adf06316d2ccb51b -r0237b2fc49d60b6602bac35ce43831b37f294c81 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision c62b21415ad7b2a77be6d0b0adf06316d2ccb51b) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision 0237b2fc49d60b6602bac35ce43831b37f294c81) @@ -490,12 +490,6 @@ // MSG_ID_OCCLUSION_BLOOD_PUMP_OVERRIDE void handleTestBloodPumpOcclusionOverrideRequest( MESSAGE_T *message ); -// MSG_ID_OCCLUSION_DIAL_IN_PUMP_OVERRIDE -void handleTestDialysateInletPumpOcclusionOverrideRequest( MESSAGE_T *message ); - -// MSG_ID_OCCLUSION_DIAL_OUT_PUMP_OVERRIDE -void handleTestDialysateOutletPumpOcclusionOverrideRequest( MESSAGE_T *message ); - // MSG_ID_PRES_OCCL_SEND_INTERVAL_OVERRIDE void handleTestPresOcclBroadcastIntervalOverrideRequest( MESSAGE_T *message );