Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -216,12 +216,10 @@ if ( TRUE == didTimeout( fillStartTime, fillTimeoutMS ) ) { -#ifndef DISABLE_AIR_TRAP_LEVELING_ALARM if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_AIR_TRAP_LEVELING_ALARM ) != SW_CONFIG_ENABLE_VALUE ) { activateAlarmNoData( ALARM_ID_AIR_TRAP_FILL_DURING_TREATMENT ); } -#endif } } } Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -505,7 +505,6 @@ *************************************************************************/ void resetBloodPumpRotorCount( void ) { -#ifndef WORN_OUT_CARTRIDGE if ( getSoftwareConfigStatus( SW_CONFIG_ENABLE_WORN_OUT_CARTRIDGE ) != SW_CONFIG_ENABLE_VALUE ) { bloodPumpRotorCounter.data = 0; @@ -514,9 +513,6 @@ { bloodPumpRotorCounter.data = BP_MAX_ROTOR_COUNT_FOR_WEAR; } -#else - bloodPumpRotorCounter.data = BP_MAX_ROTOR_COUNT_FOR_WEAR; -#endif } /*********************************************************************//** @@ -1075,32 +1071,29 @@ BOOL isDirIncorrect; U08 dirErrorCnt = getFPGABloodPumpHallSensorStatus() & PUMP_DIR_ERROR_COUNT_MASK; -#ifndef DISABLE_PUMP_DIRECTION_CHECKS // Check pump direction error count if ( ( lastBloodPumpDirectionCount != dirErrorCnt ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { lastBloodPumpDirectionCount = dirErrorCnt; SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_PUMP_DIRECTION_STATUS_ERROR, (U32)HD_PUMP_BLOOD_PUMP ) } -#endif bpMCDir = ( getMeasuredBloodPumpMCSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); bpDir = ( getMeasuredBloodPumpSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); // Check set direction vs. direction from hall sensors vs. direction from sign of motor controller speed isDirIncorrect = ( bloodPumpDirectionSet != bpDir ) || ( bloodPumpDirectionSet != bpMCDir ); - if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK, isDirIncorrect ) ) + if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK, isDirIncorrect ) ) && + ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_DIRECTION_CHECKS - if ( ( bloodPumpDirectionSet != bpDir ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) + if ( bloodPumpDirectionSet != bpDir ) { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK, (U32)bloodPumpDirectionSet, (U32)bpDir ) } else { SET_ALARM_WITH_2_U32_DATA( ALARM_ID_BLOOD_PUMP_MC_DIRECTION_CHECK, (U32)bloodPumpDirectionSet, (U32)bpMCDir ) } -#endif } } else @@ -1131,10 +1124,8 @@ ( 0 == targetBloodFlowRate ) && ( measMotorSpeed > BP_MAX_MOTOR_SPEED_WHILE_OFF_RPM ) ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_BLOOD_PUMP_OFF_CHECK, measMotorSpeed ); activateSafetyShutdown(); -#endif } // Checks that only occur when pump is running (and beyond ramp). @@ -1152,18 +1143,14 @@ ( deltaMotorSpeed > BP_MAX_MOTOR_SPEED_ERROR_RPM ) || ( deltaMCMotorSpeed > BP_MAX_MOTOR_SPEED_ERROR_RPM ) ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_BLOOD_PUMP_MOTOR_SPEED_CHECK, cmdMotorSpeed, measMotorSpeed ); -#endif } // Check measured rotor speed vs. measured motor speed while controlling to target if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_CHECK, deltaRotorSpeed > BP_MAX_ROTOR_VS_MOTOR_DIFF_RPM ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_BLOOD_PUMP_ROTOR_SPEED_CHECK, measRotorSpeed, measMotorSpeed ); -#endif } } else @@ -1192,9 +1179,7 @@ if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK, isOffMCCurrentBad || isRunningMCCurrentBad ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_MOTOR_CURRENT_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_BLOOD_PUMP_MC_CURRENT_CHECK, bpCurr ); -#endif } } @@ -1208,7 +1193,6 @@ *************************************************************************/ static void checkBloodPumpFlowRate( void ) { -#ifndef DISABLE_PUMP_FLOW_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { F32 flow = getMeasuredBloodFlowRate(); @@ -1219,7 +1203,6 @@ SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_BLOOD_FLOW_OUT_OF_RANGE, flow ); } } -#endif } /*********************************************************************//** Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r40f46e196349e3dd730048a354df8bbb2e40407d -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 40f46e196349e3dd730048a354df8bbb2e40407d) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -414,12 +414,10 @@ } else { -#ifndef IGNORE_BLOOD_LEAK_ALARM if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) { activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_SENSOR_SET_POINT_SET_FAILURE ); } -#endif } } else @@ -524,12 +522,10 @@ { if ( TRUE == didTimeout( bloodLeakZeroStartTime, BLOOD_LEAK_TIMEOUT_MS ) ) { -#ifndef IGNORE_BLOOD_LEAK_ALARM if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) { activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_FAULT ); } -#endif } } @@ -601,12 +597,10 @@ if ( ++bloodLeakPersistenceCtr > BLOOD_LEAK_PERSISTENCE ) { bloodLeakPersistenceCtr = BLOOD_LEAK_PERSISTENCE; -#ifndef IGNORE_BLOOD_LEAK_ALARM if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) { activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_DETECTED ); } -#endif } } else // Blood leak not detected @@ -617,12 +611,10 @@ } else { -#ifndef IGNORE_BLOOD_LEAK_ALARM if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_ALARM ) != SW_CONFIG_ENABLE_VALUE ) { clearAlarmCondition( ALARM_ID_HD_BLOOD_LEAK_DETECTED ); } -#endif } } Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -1003,15 +1003,13 @@ MOTOR_DIR_T dipMCDir, dipDir; U08 dirErrorCnt = getFPGADialInPumpHallSensorStatus() & PUMP_DIR_ERROR_COUNT_MASK; -#ifndef DISABLE_PUMP_DIRECTION_CHECKS // Check pump direction error count if ( ( lastDialInPumpDirectionCount != dirErrorCnt ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { lastDialInPumpDirectionCount = dirErrorCnt; SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_PUMP_DIRECTION_STATUS_ERROR, (U32)HD_PUMP_DIALYSATE_INLET_PUMP ) } -#endif dipMCDir = ( getMeasuredDialInPumpMCSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); dipDir = ( getMeasuredDialInPumpSpeed() >= 0.0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); @@ -1022,9 +1020,7 @@ if ( ( ++errorDialInPumpDirectionPersistTimerCtr >= DIP_DIRECTION_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_DIRECTION_CHECKS SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_DIRECTION_CHECK, (U32)dialInPumpDirectionSet, (U32)dipDir ) -#endif } } // Check set direction vs. direction from sign of motor controller speed @@ -1033,9 +1029,7 @@ if ( ( ++errorDialInPumpDirectionPersistTimerCtr >= DIP_DIRECTION_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_DIRECTION_CHECKS SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_DIRECTION_CHECK, (U32)dialInPumpDirectionSet, (U32)dipMCDir ) -#endif } } else @@ -1074,10 +1068,8 @@ if ( ( ++errorDialInMotorOffPersistTimerCtr >= DIP_OFF_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_OFF_CHECK, measMotorSpeed ); activateSafetyShutdown(); -#endif } } else @@ -1106,9 +1098,7 @@ if ( ( ++errorDialInMotorSpeedPersistTimerCtr >= DIP_MOTOR_SPEED_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MOTOR_SPEED_CHECK, cmdMotorSpeed, measMotorSpeed ); -#endif } } else @@ -1122,9 +1112,7 @@ if ( ( ++errorDialInRotorSpeedPersistTimerCtr >= DIP_ROTOR_SPEED_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_IN_PUMP_ROTOR_SPEED_CHECK, measRotorSpeed, measMotorSpeed ); -#endif } } else @@ -1153,13 +1141,11 @@ F32 flow = getMeasuredDialInFlowRate(); // Range check on measure DPi flow rate. -#ifndef DISABLE_PUMP_FLOW_CHECKS if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_DIAL_IN_FLOW_OUT_OF_RANGE, ( flow > DIP_MAX_FLOW_RATE ) || ( flow < DIP_MIN_FLOW_RATE ) ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_DIAL_IN_FLOW_OUT_OF_RANGE, flow ); } -#endif // Check only performed while in treatment mode and while we are in control to target state if ( ( MODE_TREA == getCurrentOperationMode() ) && ( DIAL_IN_PUMP_CONTROL_TO_TARGET_STATE == dialInPumpState ) ) @@ -1174,9 +1160,7 @@ if ( ( ++errorDialInFlowVsMotorSpeedPersistTimerCtr >= DIP_FLOW_VS_SPEED_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_FLOW_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_IN_PUMP_FLOW_VS_MOTOR_SPEED_CHECK, flow, speed ); -#endif } } else @@ -1212,9 +1196,7 @@ if ( ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_MOTOR_CURRENT_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); -#endif } } else @@ -1232,9 +1214,7 @@ if ( ( dipCurrErrorDurationCtr > DIP_MAX_CURR_ERROR_DURATION_MS ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_MOTOR_CURRENT_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_IN_PUMP_MC_CURRENT_CHECK, getMeasuredDialInPumpMCCurrent() ); -#endif } } else Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -935,9 +935,7 @@ if ( ( ++errorDialOutPumpDirectionPersistTimerCtr >= DOP_DIRECTION_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_DIRECTION_CHECKS SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_DIRECTION_CHECK, (U32)dialOutPumpDirectionSet, (U32)dopDir ) -#endif } } // Check set direction vs. direction from sign of motor controller speed @@ -946,9 +944,7 @@ if ( ( ++errorDialOutPumpDirectionPersistTimerCtr >= DOP_DIRECTION_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_DIRECTION_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_DIRECTION_CHECKS SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_DIRECTION_CHECK, (U32)dialOutPumpDirectionSet, (U32)dopMCDir ) -#endif } } else @@ -987,10 +983,8 @@ if ( ( ++errorDialOutMotorOffPersistTimerCtr >= DOP_OFF_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_OFF_CHECK, measMotorSpeed ); activateSafetyShutdown(); -#endif } } else @@ -1018,9 +1012,7 @@ if ( ( ++errorDialOutMotorSpeedPersistTimerCtr >= DOP_MOTOR_SPEED_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MOTOR_SPEED_CHECK, cmdMotorSpeed, measMotorSpeed ); -#endif } } else @@ -1034,9 +1026,7 @@ if ( ( ++errorDialOutRotorSpeedPersistTimerCtr >= DOP_ROTOR_SPEED_ERROR_PERSIST ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_SPEED_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_PUMP_SPEED_CHECKS SET_ALARM_WITH_2_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_ROTOR_SPEED_CHECK, measRotorSpeed, measMotorSpeed ); -#endif } } else @@ -1073,9 +1063,7 @@ if ( ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_MOTOR_CURRENT_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); -#endif } } else @@ -1093,9 +1081,7 @@ if ( ( dopCurrErrorDurationCtr > DOP_MAX_CURR_ERROR_DURATION_MS ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_MOTOR_CURRNT_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { -#ifndef DISABLE_MOTOR_CURRENT_CHECKS SET_ALARM_WITH_1_F32_DATA( ALARM_ID_DIAL_OUT_PUMP_MC_CURRENT_CHECK, getMeasuredDialOutPumpMCCurrent() ); -#endif } } else Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -122,18 +122,14 @@ 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. -#endif static U32 emptySalineBagCtr = 0; ///< Timer counter for empty bag detection. static U08 lastArterialPressureReadCtr; ///< Previous arterial pressure sensor read count. static U08 lastVenousPressureReadCtr; ///< Previous venous pressure sensor read count. -#ifndef DISABLE_PRESSURE_CHECKS static U08 lastBPOcclReadCtr; ///< Previous BP occlusion sensor read count. static U08 lastBPErrorCtr; ///< Previous BP error count. -#endif static F32 artPressureReadingsLong[ SIZE_OF_LONG_ART_ROLLING_AVG ]; ///< Holds flow samples for long arterial pressure rolling average. static U32 artPressureReadingsLongIdx = 0; ///< Index for next sample in rolling average array. @@ -188,25 +184,21 @@ lastArterialPressureReadCtr = 0; lastVenousPressureReadCtr = 0; -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { lastBPOcclReadCtr = 0; lastBPErrorCtr = 0; } -#endif longFilteredArterialPressure = 0.0; shortFilteredArterialPressure = 0.0; shortFilteredVenousPressure = 0.0; presOcclDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { bloodPumpOcclusionAfterCartridgeInstall = 0; } -#endif } /*********************************************************************//** @@ -285,12 +277,10 @@ *************************************************************************/ void setOcclusionInstallLevel( void ) { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { bloodPumpOcclusionAfterCartridgeInstall = getMeasuredBloodPumpOcclusion(); } -#endif } /*********************************************************************//** @@ -391,12 +381,10 @@ } else { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_1_U32_DATA( ALARM_ID_ARTERIAL_PRESSURE_SENSOR_FAULT, (U32)artPresAlarm ) } -#endif } // Check for stale venous pressure reading @@ -416,12 +404,10 @@ // If venous pressure sensor status is not normal, fault else { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // SET_ALARM_WITH_1_U32_DATA( ALARM_ID_VENOUS_PRESSURE_SENSOR_FAULT, (U32)venPresStatus ) // TODO - persistence? YES, need persistence - getting a stale data status. OR maybe speed up ADC in FPGA. } -#endif } // Check venous pressure sensor temperature @@ -451,7 +437,6 @@ U08 bpReadCtr = getFPGABloodPumpOcclusionReadCounter(); U08 bpErrorCtr = getFPGABloodPumpOcclusionErrorCounter(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Check for sensor errors @@ -466,19 +451,16 @@ activateAlarmNoData( ALARM_ID_HD_BP_OCCLUSION_READ_TIMEOUT_ERROR ); } } -#endif // Record occlusion sensor readings bloodPumpOcclusion.data = (U32)getFPGABloodPumpOcclusion(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Record occlusion read and error counters for next time around lastBPOcclReadCtr = bpReadCtr; lastBPErrorCtr = bpErrorCtr; } -#endif } /*********************************************************************//** @@ -493,7 +475,6 @@ { F32 artPres = getFilteredArterialPressure(); -#ifndef DISABLE_ARTERIAL_PRESSURE_CHECK if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ARTERIAL_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) { // Check arterial pressure is in range @@ -533,7 +514,6 @@ isPersistentAlarmTriggered( ALARM_ID_ARTERIAL_PRESSURE_HIGH, FALSE ); } } -#endif } /*********************************************************************//** @@ -548,7 +528,6 @@ { F32 venPres = getFilteredVenousPressure(); -#ifndef DISABLE_VENOUS_PRESSURE_CHECK if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VENOUS_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) { // Check venous pressure is in range @@ -595,7 +574,6 @@ isPersistentAlarmTriggered( ALARM_ID_VENOUS_PRESSURE_HIGH, FALSE ); } } -#endif } /*********************************************************************//** @@ -610,7 +588,6 @@ { U32 bpOccl = getMeasuredBloodPumpOcclusion(); -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { // Range check occlusion sensor @@ -630,7 +607,6 @@ clearAlarmCondition( ALARM_ID_OCCLUSION_BLOOD_PUMP ); } } -#endif } /*********************************************************************//** @@ -811,7 +787,6 @@ *************************************************************************/ void execPresOcclTest( void ) { -#ifndef DISABLE_PRESSURE_CHECKS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) { U32 const bpPressure = getMeasuredBloodPumpOcclusion(); @@ -833,7 +808,6 @@ SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_VENOUS_PRESSURE_SELF_TEST_FAILURE, venousPressure ); } } -#endif } /*********************************************************************//** Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -196,10 +196,8 @@ static S32 syringePumpLastPositions[ SYRINGE_PUMP_SPEED_CALC_BUFFER_LEN ]; ///< Last encoder positions for the syringe pump. static U32 syringePumpMotorSpeedCalcIdx; ///< Index into 1 second buffer of syringe pump encoder positions. static U32 syringePumpSpeedCalcTimerCounter; ///< Used to calculate measured rate from change in position over time. -#ifndef DISABLE_SYRINGE_PUMP_ALARMS static MOTOR_DIR_T syringePumpControllerMeasuredDirection; ///< Measured direction of syringe pump per controller. static MOTOR_DIR_T syringePumpEncoderMeasuredDirection; ///< Measured direction of syringe pump per encoder position relative to previous. -#endif static BOOL syringePumpRetractRequested; ///< Flag indicates a retract operation is requested. static BOOL syringePumpSeekRequested; ///< Flag indicates a plunger seek operation is requested. @@ -276,13 +274,11 @@ syringePumpVolumeStartPosition = 0; syringePumpHomePositionOffset = 0; syringePumpLastPosition = 0; -#ifndef DISABLE_SYRINGE_PUMP_ALARMS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { syringePumpControllerMeasuredDirection = MOTOR_DIR_FORWARD; syringePumpEncoderMeasuredDirection = MOTOR_DIR_FORWARD; } -#endif syringePumpDataPublicationTimerCounter = 0; syringePumpSpeedCalcTimerCounter = 0; @@ -478,24 +474,19 @@ *************************************************************************/ BOOL retractSyringePump( void ) { -#ifndef ALWAYS_ALLOW_SYRINGE_PUMP_CMDS if ( ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) && ( heparinDeliveryState != HEPARIN_STATE_OFF ) ) || ( getSoftwareConfigStatus( SW_CONFIG_ENABLE_SYRINGE_PUMP_CMDS ) ) == SW_CONFIG_ENABLE_VALUE ) { -#else - heparinDeliveryState = HEPARIN_STATE_STOPPED; - if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) ) -#endif heparinDeliveryState = HEPARIN_STATE_STOPPED; if ( ( SYRINGE_PUMP_OFF_STATE == syringePumpState ) ) { syringePumpSetRate = SYRINGE_PUMP_RETRACT_RATE; syringePumpRetractRequested = TRUE; } - return syringePumpRetractRequested; - } + + return syringePumpRetractRequested; } /*********************************************************************//** @@ -578,12 +569,10 @@ } else { -#ifndef DISABLE_SYRINGE_PUMP if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, (F32)SW_FAULT_ID_HD_SYRINGE_INVALID_BOLUS_CMD, tgtRate ) } -#endif } return syringePumpBolusRequested; @@ -611,12 +600,10 @@ } else { -#ifndef DISABLE_SYRINGE_PUMP if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, (F32)SW_FAULT_ID_HD_SYRINGE_INVALID_CONT_CMD, flowRate ) } -#endif } return syringePumpContinuousRequested; @@ -1013,15 +1000,13 @@ calcSafetyVolumeDelivered(); // Calculate measured rate (mL/hr) calcMeasRate(); -#ifndef DISABLE_SYRINGE_PUMP_ALARMS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { // Get measured direction syringePumpControllerMeasuredDirection = ( ( getSyringePumpEncoderStatus() & SYRINGE_PUMP_ENCODER_DIRECTION_BIT ) != 0 ? MOTOR_DIR_REVERSE : MOTOR_DIR_FORWARD ); // Calculate direction from encoder position relative to last syringePumpEncoderMeasuredDirection = ( getSyringePumpPosition() - syringePumpLastPosition >= 0 ? MOTOR_DIR_FORWARD : MOTOR_DIR_REVERSE ); } -#endif // Check if syringe pump is on while BP is off { @@ -1040,12 +1025,10 @@ if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_SYRINGE_PUMP_ADC_ERROR, ( ( getCurrentOperationMode() > MODE_INIT ) && ( lastSyringePumpADCReadCtr == getSyringePumpADCReadCounter() ) ) ) ) { -#ifndef DISABLE_SYRINGE_PUMP_ALARMS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { activateAlarmNoData( ALARM_ID_HD_SYRINGE_PUMP_ADC_ERROR ); } -#endif } lastSyringePumpADCReadCtr = getSyringePumpADCReadCounter(); @@ -1186,15 +1169,13 @@ { SYRINGE_PUMP_STATE_T result = SYRINGE_PUMP_OFF_STATE; -#ifndef DISABLE_SYRINGE_PUMP_ALARMS // Check position is not changing while stopped - if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_SYRINGE_PUMP_NOT_STOPPED_ERROR, ( syringePumpLastPosition != getSyringePumpPosition() ) ) ) || + if ( ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_SYRINGE_PUMP_NOT_STOPPED_ERROR, ( syringePumpLastPosition != getSyringePumpPosition() ) ) ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) ) { activateAlarmNoData( ALARM_ID_HD_SYRINGE_PUMP_NOT_STOPPED_ERROR ); activateSafetyShutdown(); } -#endif // Check for request flags if ( TRUE == syringePumpRetractRequested ) @@ -1352,12 +1333,10 @@ } else { -#ifndef DISABLE_SYRINGE_PUMP_ALARMS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SYRINGE_PUMP_NOT_ENOUGH_HEPARIN_ALARM, syringeVol, txVolume ); } -#endif } } @@ -1568,7 +1547,6 @@ { BOOL result = stopPump; -#ifndef DISABLE_SYRINGE_PUMP_ALARMS if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_SYRINGE_PUMP_ENCODER_DIRECTION_ERROR, ( syringePumpEncoderMeasuredDirection != expDir ) ) ) @@ -1582,7 +1560,6 @@ SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SYRINGE_PUMP_CONTROLLER_DIRECTION_ERROR, (U32)syringePumpControllerMeasuredDirection, (U32)syringePumpState ); } } -#endif return result; } @@ -1691,7 +1668,7 @@ static BOOL checkMeasRate( BOOL stopPump, F32 pctMargin ) { BOOL result = stopPump; -#ifndef DISABLE_SYRINGE_PUMP_ALARMS + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) { F32 rate = getSyringePumpMeasRate(); @@ -1707,7 +1684,6 @@ SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_SYRINGE_PUMP_SPEED_ERROR, syringePumpSetRate, rate ) } } -#endif return result; } Index: firmware/App/HDCommon.h =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/HDCommon.h (.../HDCommon.h) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -38,27 +38,14 @@ // #define SIMULATE_UI 1 // Build w/o requirement that UI be there // #define TASK_TIMING_OUTPUT_ENABLED 1 // Re-purposes alarm lamp pins for task timing // TODO convert the new configuration way -// #define DISABLE_ALARM_AUDIO 1 // Disable alarm audio // TODo sw config implemented -// #define SKIP_POST 1 // Skip POST tests - all pass // TODO remove this -// #define DISABLE_AIR_TRAP_LEVELING_ALARM 1 // Disable air trap level control alarms // TODO sw config implemented // #define DISABLE_3WAY_VALVES 1 // Disable 3-way valves // #define TST_3WAY_VALVES_ALWAYS_OPEN 1 // After POST and homing, open all 4 valves // #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 // TODO sw config implemented // #define RUN_BP_OPEN_LOOP 1 // Run blood pump in open loop mode // #define RUN_DPI_OPEN_LOOP 1 // Run dialysate inlet pump in open loop mode -// #define WORN_OUT_CARTRIDGE 1 // Running with an old worn out cartridge (max wear) // TODO sw config implemented // #define PBA_ESTIMATION 1 // Estimate arterial pressure rather than look at PBA sensor -// #define DISABLE_MOTOR_CURRENT_CHECKS 1 // Do not error on HD pump current checks // TODO sw config implemented -// #define DISABLE_PUMP_FLOW_CHECKS 1 // Do not error on HD pump flow checks // TODO sw config implemented -// #define DISABLE_PUMP_SPEED_CHECKS 1 // Do not error on HD pump speed checks // TODO sw config implemented -// #define DISABLE_PUMP_DIRECTION_CHECKS 1 // Do not error on HD pump direction checks // TODO sw config implemented -// #define DISABLE_SYRINGE_PUMP 1 // Disable syringe pump functionality // TODO sw config implemented -// #define ALWAYS_ALLOW_SYRINGE_PUMP_CMDS 1 // Allow syringe pump commands at any time except when pump is busy // TODO sw config implemented -// #define DISABLE_PRESSURE_CHECKS 1 // Do not error on HD pressure checks // TODO sw config implemented -// #define DISABLE_ARTERIAL_PRESSURE_CHECK 1 // Do not error on arterial pressure out of range // TODO sw config implemented -// #define DISABLE_VENOUS_PRESSURE_CHECK 1 // Do not error on venous pressure out of range // TODO sw config implemented #define USE_PBO_AS_PBA 1 // PBo readings used for PBA, PBo replaced with fixed pressure (100 mmHg) // #define DISABLE_UF_ALARMS 1 // Do not error on HD ultrafiltration checks @@ -77,24 +64,14 @@ // #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters #define DISABLE_VOLTAGE_MONITOR 1 // Disable voltage monitoring/alarms #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 // TODO New config implemented // #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps #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 #define DISABLE_ILLEGAL_AIR_TRAP_ALARM 1 // Disable illegal state for air trap alarm #define SKIP_RESERVOIR_ALARMS 1 // Skip reservoir management alarms -// #define IGNORE_BLOOD_LEAK_SELF_TEST 1 // Ignore blood leak self test // TODO New config implemented -// #define IGNORE_BLOOD_LEAK_ALARM 1 // Ignore blood leak alarm // TODO New config implemented - // Skip Pre-Treatment and get to treatment as soon as possible -// #define SKIP_UI_INTERACTION 1 // Skip UI interaction. // TODO New config implemented -// #define SKIP_SAMPLE_WATER 1 // Skip pre-treatment sample water // TODO New config implemented -// #define SKIP_CONSUMABLE_TESTS 1 // Skip pre-treatment consumable Self-tests // TODO New config implemented -// #define SKIP_DRY_SELF_TESTS 1 // Skip pre-treatment dry self-tests // TODO New config implemented -// #define SKIP_PRIMING 1 // Skip Pre-treatment Prime // TODO New config implemented -// #define SKIP_WET_SELF_TESTS 1 // Skip Pre-treatment prime wet self-tests // TODO New config implemented #include #include Index: firmware/App/Modes/BloodPrime.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Modes/BloodPrime.c (.../BloodPrime.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -235,14 +235,12 @@ signalBloodPrimeToDialysis(); // Signal treatment mode that it's time to start dialysis cmdStopDGTrimmerHeater(); // Stop trimmer heater - dialysis sub-mode will restart as appropriate } -#ifndef DISABLE_PUMP_FLOW_CHECKS // Is blood prime taking too long based on set BP rate? else if ( ( fabs( expectedBloodPrimeVolume_mL - getBloodPrimeVolume() ) > MAX_BLOOD_PRIME_VOLUME_ERROR_ML ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) { activateAlarmNoData( ALARM_ID_BLOOD_PRIME_VOLUME_CHECK_FAILURE ); } -#endif else { // ramp blood pump on ramp interval Index: firmware/App/Modes/ConsumableSelfTest.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Modes/ConsumableSelfTest.c (.../ConsumableSelfTest.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -76,9 +76,7 @@ switch( currentConsumableSelfTestState ) { case CONSUMABLE_SELF_TESTS_INSTALL_STATE: -#ifdef SKIP_UI_INTERACTION - consumableInstallConfirmed = TRUE; -#endif + if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { consumableInstallConfirmed = TRUE; @@ -87,11 +85,6 @@ if ( TRUE == consumableInstallConfirmed ) { consumableInstallConfirmed = FALSE; -#ifndef SKIP_CONSUMABLE_TESTS - //currentConsumableSelfTestState = CONSUMABLE_SELF_TESTS_FILL_CMD_STATE; -#else - currentConsumableSelfTestState = CONSUMABLE_SELF_TESTS_COMPLETE_STATE; -#endif if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_CONSUMABLES_TESTS ) != SW_CONFIG_ENABLE_VALUE ) { currentConsumableSelfTestState = CONSUMABLE_SELF_TESTS_FILL_CMD_STATE; Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -951,7 +951,6 @@ salineBolusAbortRequested = FALSE; result = SALINE_BOLUS_STATE_IDLE; } -#ifndef DISABLE_PUMP_FLOW_CHECKS // Determine if saline bolus is under/over delivering else if ( ( fabs( expectedSalineBolusVolume_mL - bolusSalineVolumeDelivered_mL ) > maxBolusErrorMl ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) @@ -960,7 +959,6 @@ errorFound = TRUE; result = SALINE_BOLUS_STATE_IDLE; } -#endif } // Are we stopping the bolus? Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -223,7 +223,6 @@ break; case POST_STATE_ALARM_AUDIO: -#ifndef DISABLE_ALARM_AUDIO if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) { testStatus = execAlarmAudioSelfTest(); @@ -232,9 +231,6 @@ { testStatus = SELF_TEST_STATUS_PASSED; } -#else - testStatus = SELF_TEST_STATUS_PASSED; -#endif postState = handlePOSTStatus( testStatus ); break; Index: firmware/App/Modes/ModePostTreat.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -366,9 +366,6 @@ if ( STATE_CLOSED == getFPGADoorState() ) { -#ifdef SKIP_UI_INTERACTION - patientDisconnectionConfirmed = TRUE; -#endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { patientDisconnectionConfirmed = TRUE; @@ -414,9 +411,6 @@ { HD_POST_TREATMENT_STATE_T state = HD_POST_TREATMENT_DISPOSABLE_REMOVAL_STATE; -#ifdef SKIP_UI_INTERACTION - disposableRemovalConfirmed = TRUE; -#endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { disposableRemovalConfirmed = TRUE; Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -46,15 +46,9 @@ #define DIP_PATIENT_CONNECTION_FLOW_RATE_ML_MIN 100 ///< Patient connection sub-mode dialysate inlet pump flow rate in mL/min. -#ifndef SKIP_PRIMING #define PRE_TREATMENT_FLUSH_RESERVOIR_VOLUME_ML 500 ///< Fill reservoir to this volume (in mL) to flush filter and lines. #define PRE_TREATMENT_FILL_RESERVOIR_ONE_VOLUME_ML 1300 ///< Fill reservoir one to this volume (in mL) during pre-treatment mode. #define PRE_TREATMENT_FILL_RESERVOIR_TWO_VOLUME_ML 700 ///< Fill reservoir two to this volume (in mL) during pre-treatment mode. -#else -//#define PRE_TREATMENT_FLUSH_RESERVOIR_VOLUME_ML FILL_RESERVOIR_TO_VOLUME_ML -//#define PRE_TREATMENT_FILL_RESERVOIR_ONE_VOLUME_ML FILL_RESERVOIR_TO_VOLUME_ML -//#define PRE_TREATMENT_FILL_RESERVOIR_TWO_VOLUME_ML FILL_RESERVOIR_TO_VOLUME_ML -#endif /// States of the pre-treatment reservoir management state machine. typedef enum PreTreatmentReservoirMgmt_States @@ -195,9 +189,6 @@ switch ( currentPreTreatmentState ) { case HD_PRE_TREATMENT_START_STATE: -#ifndef SKIP_SAMPLE_WATER - //transitionToSampleWater(); -#endif if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SAMPLE_WATER ) != SW_CONFIG_ENABLE_VALUE ) { transitionToSampleWater(); @@ -355,10 +346,6 @@ BOOL accepted = FALSE; REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NO_PATIENT_CONNECTION_CONFIRM; -#ifdef SKIP_UI_INTERACTION - patientConnectionConfirm = TRUE; -#endif - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { patientConnectionConfirm = TRUE; @@ -654,10 +641,6 @@ { HD_PRE_TREATMENT_MODE_STATE_T state = HD_PRE_TREATMENT_CART_INSTALL_STATE; -#ifdef SKIP_UI_INTERACTION - confirmInstallRequested = TRUE; -#endif - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { confirmInstallRequested = TRUE; @@ -775,10 +758,6 @@ execPreTreatmentRecirc(); -#ifdef SKIP_UI_INTERACTION - continueToTreatmentRequested = TRUE; -#endif - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { continueToTreatmentRequested = TRUE; @@ -1073,12 +1052,6 @@ if ( FALSE == reservoirFlushedStatus[ DG_RESERVOIR_1 ] ) { -#ifdef SKIP_PRIMING - //reservoirFilledStatus[ DG_RESERVOIR_1 ] = TRUE; -#else - //reservoirFlushedStatus[ DG_RESERVOIR_1 ] = TRUE; - //cmdSetDGActiveReservoir( DG_RESERVOIR_1 ); -#endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRIMING ) ) { reservoirFilledStatus[ DG_RESERVOIR_1 ] = TRUE; Index: firmware/App/Modes/Prime.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/Prime.c (.../Prime.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Modes/Prime.c (.../Prime.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -181,11 +181,6 @@ switch ( currentPrimeState ) { case HD_PRIME_START_STATE: -#ifdef SKIP_PRIMING - currentPrimeState = HD_PRIME_RESERVOIR_ONE_FILL_COMPLETE_STATE; -#else - //currentPrimeState = HD_PRIME_WAIT_FOR_USER_START_STATE; -#endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRIMING ) ) { currentPrimeState = HD_PRIME_RESERVOIR_ONE_FILL_COMPLETE_STATE; @@ -431,10 +426,6 @@ // Keep updating start time until the user requested priming primeStartTime = getMSTimerCount(); -#ifdef SKIP_UI_INTERACTION - primeStartRequested = TRUE; -#endif - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_INTERACTION ) ) { primeStartRequested = TRUE; @@ -590,11 +581,6 @@ steadyVolumeSamplingStartTime = getMSTimerCount(); primeDialysateDialyzerStartTime = getMSTimerCount(); - #ifdef SKIP_PRIMING - state = HD_PRIME_WET_SELF_TESTS_STATE; - #else - //state = HD_PRIME_DIALYSATE_DIALYZER_STATE; - #endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRIMING ) ) { state = HD_PRIME_WET_SELF_TESTS_STATE; @@ -846,11 +832,6 @@ signalResumeSelfTests(); } -#ifndef SKIP_WET_SELF_TESTS - //execWetSelfTests(); - - //if ( TRUE == isWetSelfTestsPassed() ) -#endif if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_WET_SELF_TEST ) != SW_CONFIG_ENABLE_VALUE ) { execWetSelfTests(); Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -400,7 +400,6 @@ setupForRinsebackStopOrPause(); result = RINSEBACK_PAUSED_STATE; } -#ifndef DISABLE_PUMP_FLOW_CHECKS // Is rinseback taking too long? else if ( ( fabs( expectedRinsebackVolume_mL - getRinsebackVolume() ) > MAX_RINSEBACK_VOLUME_ERROR_ML ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMP_FLOW_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) ) @@ -410,7 +409,6 @@ activateAlarmNoData( ALARM_ID_RINSEBACK_VOLUME_CHECK_FAILURE ); result = RINSEBACK_STOP_STATE; } -#endif // Otherwise, continue rinseback else { // Has user requested rate change? Index: firmware/App/Modes/SampleWater.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/SampleWater.c (.../SampleWater.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Modes/SampleWater.c (.../SampleWater.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -129,10 +129,6 @@ { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_FAILED; -#ifdef SKIP_SAMPLE_WATER - sampleWaterResult = TRUE; -#endif - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SAMPLE_WATER ) ) { sampleWaterResult = TRUE; Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -221,7 +221,6 @@ F32 const bolusVol = getTreatmentParameterF32( TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME ); F32 const hepRate = getTreatmentParameterF32( TREATMENT_PARAM_HEPARIN_DISPENSE_RATE ); -#ifndef DISABLE_SYRINGE_PUMP if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) { useHeparin = ( ( bolusVol > 0.0 ) || ( hepRate > 0.0 ) ? TRUE : FALSE ); @@ -230,9 +229,7 @@ { useHeparin = FALSE; } -#else - useHeparin = FALSE; -#endif + currentNoCartSelfTestsState = NO_CART_SELF_TESTS_START_STATE; runPumpStartTime = 0; havePumpsStarted = FALSE; @@ -385,12 +382,6 @@ switch ( currentDrySelfTestsState ) { case DRY_SELF_TESTS_START_STATE: -#ifdef SKIP_DRY_SELF_TESTS - // TODO: Remove once dry self-test is ready to use - currentDrySelfTestsState = DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE; -#else - //currentDrySelfTestsState = DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; -#endif if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) ) { // TODO: Remove once dry self-test is ready to use @@ -1047,11 +1038,6 @@ if ( TRUE == selfTestsResumeRequested ) { selfTestsResumeRequested = FALSE; -#ifndef SKIP_DRY_SELF_TESTS - //state = DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; -#else - state = DRY_SELF_TESTS_SYRINGE_PUMP_PRIME_STATE; -#endif if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DRY_SELF_TESTS ) != SW_CONFIG_ENABLE_VALUE ) { state = DRY_SELF_TESTS_WAIT_FOR_DOOR_CLOSE_STATE; Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -914,14 +914,12 @@ { if ( alarmStatus.alarmsState < NUM_OF_ALARM_PRIORITIES ) { -#ifndef DISABLE_ALARM_AUDIO if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) { setAlarmAudioState( alarmStatus.alarmsState, ALARM_AUDIO_DIVIDER_LOOKUP_TABLE[volume][ALARM_AUDIO_VOLUME_GAIN], ALARM_AUDIO_DIVIDER_LOOKUP_TABLE[volume][ALARM_AUDIO_VOLUME_DIVIDER] ); } -#endif } else { Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -rf013ac5e5de456c4fa4367884cda6515f2a51642 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision f013ac5e5de456c4fa4367884cda6515f2a51642) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -582,12 +582,12 @@ TREATMENT_RESERVOIR_MGMT_STATE_T state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_FILL_SETTLE_STATE; // Wait for the reservoir to settle and then send the commands to switch the active reservoir - if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, RESERVOIR_SETTLE_TIME_MS ) ) /*&& ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML )*/ ) + if ( ( TRUE == didTimeout( reservoirSwitchStartTimeMS, RESERVOIR_SETTLE_TIME_MS ) ) && ( volSpentML >= (F32)FILL_RESERVOIR_TO_VOLUME_ML ) ) { DG_RESERVOIR_ID_T inactiveRes = getDGInactiveReservoir(); // TODO test code remove - if ( TRUE == test ) + //if ( TRUE == test ) { // Signal dialysis sub-mode to capture baseline volume for next reservoir. setStartReservoirVolume( inactiveRes ); @@ -608,11 +608,11 @@ // TODO test code // For reservoir test, it should go back to start state - if ( FALSE == test ) + /*if ( FALSE == test ) { state = TREATMENT_RESERVOIR_MGMT_START_STATE; } - else + else*/ { state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_SWITCH_SETTLE_STATE; test = FALSE; Index: firmware/App/Services/WatchdogMgmt.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Services/WatchdogMgmt.c (.../WatchdogMgmt.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -183,15 +183,13 @@ SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 2.0, v24 ); watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } -#ifndef DISABLE_ALARM_AUDIO // Verify backup alarm audio is on when w.d. expired else if ( ( audioCurrent < MIN_BACKUP_ALARM_CURRENT_MA ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 3.0, audioCurrent ); watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } -#endif } else { @@ -216,15 +214,13 @@ SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 4.0, v24 ); watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } -#ifndef DISABLE_ALARM_AUDIO // Verify backup alarm audio is on when w.d. recovered else if ( ( audioCurrent > MAX_BACKUP_ALARM_CURRENT_MA ) && ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_WATCHDOG_POST_TEST_FAILED, 5.0, audioCurrent ); watchdogSelfTestStatus = SELF_TEST_STATUS_FAILED; } -#endif else { watchdogSelfTestStatus = SELF_TEST_STATUS_PASSED; Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -rd33ae635eb38ae8f2647f68304be74e8e4f78cfd -r667feab319b14681a0330a715da7a1ba930b518d --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision d33ae635eb38ae8f2647f68304be74e8e4f78cfd) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) @@ -78,13 +78,11 @@ // Monitor air trap level sensors execAirTrapMonitor(); -#ifndef DISABLE_SYRINGE_PUMP if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SYRINGE_PUMP ) != SW_CONFIG_ENABLE_VALUE ) { // Control/Monitor syringe pump execSyringePump(); } -#endif // Monitor blood pump and flow execBloodFlowMonitor();