Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -182,13 +182,15 @@ if ( ( AIR_TRAP_LEVEL_AIR == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_LOWER ) ) && ( AIR_TRAP_LEVEL_FLUID == getAirTrapLevel( AIR_TRAP_LEVEL_SENSOR_UPPER ) ) ) { - if ( ( ++airTrapIllegalLevelSensorsCtr >= AIR_TRAP_ILLEGAL_LEVELS_PERSISTENCE ) && - ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ILLEGAL_AIR_TRAP_ALARM ) ) != SW_CONFIG_ENABLE_VALUE ) - { -#ifndef DISABLE_ILLEGAL_AIR_TRAP_ALARM + if ( ++airTrapIllegalLevelSensorsCtr >= AIR_TRAP_ILLEGAL_LEVELS_PERSISTENCE ) - activateAlarmNoData( ALARM_ID_AIR_TRAP_ILLEGAL_LEVELS ); + { +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ILLEGAL_AIR_TRAP_ALARM ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + activateAlarmNoData( ALARM_ID_AIR_TRAP_ILLEGAL_LEVELS ); + } } } else Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -327,12 +327,16 @@ } result = TRUE; } -#ifndef NO_PUMP_FLOW_LIMITS + else // Requested flow rate too high - { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_BLOOD_FLOW_SET_TOO_HIGH, flowRate ) - } + { +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMPS_FLOW_LIMITS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_BLOOD_FLOW_SET_TOO_HIGH, flowRate ) + } + } } } Index: firmware/App/Controllers/Bubble.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/Bubble.c (.../Bubble.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Controllers/Bubble.c (.../Bubble.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -196,8 +196,9 @@ bubblesStatus[ bubble ].data = BUBBLE_DETECTED; } -#ifndef DISABLE_BUBBLE_ALARMS +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BUBBLE_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { // Check status reading and act upon if ( BUBBLE_DETECTED == getBubbleStatus( bubble ) ) @@ -237,7 +238,6 @@ } } } -#endif if ( TRUE == bubblesSelfTestRequested[ bubble ] ) { Index: firmware/App/Controllers/DGInterface.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Controllers/DGInterface.c (.../DGInterface.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -910,8 +910,9 @@ BOOL const dialysateTempRecovered = fabs( dgDialysateTemp - dgTrimmerTempSet ) < DIALYSATE_TEMP_RECOVERY_TOLERANCE_C ? TRUE : FALSE; -#ifndef DISABLE_DIALYSATE_TEMP_CHECK +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_DIALYSATE_TEMP_CHECK ) != SW_CONFIG_ENABLE_VALUE ) +#endif { if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_DIALYSATE_TEMPERATURE_HIGH, dialysateHighTemp ) ) { @@ -933,7 +934,6 @@ clearAlarmCondition( ALARM_ID_DIALYSATE_TEMPERATURE_LOW ); } } -#endif } // ********** private functions ********** Index: firmware/App/Controllers/PresOccl.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Controllers/PresOccl.c (.../PresOccl.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -388,7 +388,6 @@ F32 venTemp = getTemperatureValue( TEMPSENSOR_VENOUS_PRESSURE_SENSOR ); U08 venReadCtr = getFPGAVenousPressureReadCounter(); -#ifndef USE_PBO_AS_PBA if ( ( ARTERIAL_PRESSURE_NORMAL_OP == artPresStatus ) && ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_ENABLE_DVT_ARTERIAL_PRESSURE_SENSOR ) ) ) { @@ -402,7 +401,6 @@ // Record arterial pressure sensor read counter for next time around lastArterialPressureReadCtr = artReadCtr; - // TODO if this is the right way, change the #defines to arterial arterialPressure.data = ( (F32)(rawArterialPres - ARTERIAL_PRESSURE_OFFSET) * (ARTERIAL_PRESSURE_MAX_PSI - ARTERIAL_PRESSURE_MIN_PSI) / (F32)ARTERIAL_PRESSURE_SCALE ) + ARTERIAL_PRESSURE_MIN_PSI; arterialPressure.data = arterialPressure.data * PSI_TO_MMHG; @@ -414,9 +412,8 @@ U08 artErrorCtr = getFPGAArterialPressureErrorCounter(); // Check for stale arterial pressure reading - // TODO why is this alarm venous pressure sensor? // TODO I think we should check the change of the error count not if it is greater than 0? - if ( FALSE == isPersistentAlarmTriggered( ALARM_ID_HD_VENOUS_PRESSURE_READ_TIMEOUT_ERROR, ( lastArterialPressureReadCtr == artReadCtr || artErrorCtr > 0 ) ) ) + if ( FALSE == isPersistentAlarmTriggered( ALARM_ID_HD_ARTERIAL_PRESSURE_READ_TIMEOUT_ERROR, ( lastArterialPressureReadCtr == artReadCtr || artErrorCtr > 0 ) ) ) { arterialPressure.data = ARTERIAL_PRESSURE_V_PER_BIT * ( rawArterialPres / ( ARTERIAL_PRESSURE_SENSITIVITY * ARTERIAL_PRESSURE_V_BIAS ) ) + getF32OverrideValue( &arterialPressureOffset ); @@ -443,8 +440,10 @@ } // Record venous pressure sensor read counter for next time around lastVenousPressureReadCtr = venReadCtr; + // Convert venous pressure to PSI and then mmHg venPresPSI = ( (F32)(venPres - VENOUS_PRESSURE_OFFSET) * (VENOUS_PRESSURE_MAX_PSI - VENOUS_PRESSURE_MIN_PSI) / (F32)VENOUS_PRESSURE_SCALE ) + VENOUS_PRESSURE_MIN_PSI; + // Convert venous pressure from PSI to mmHg if sensor status is normal if ( VENOUS_PRESSURE_NORMAL_OP == venPresStatus ) { @@ -453,7 +452,9 @@ // If venous pressure sensor status is not normal, fault else { +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PRESSURE_CHECKS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { // 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. } @@ -466,10 +467,6 @@ { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_VENOUS_PRESSURE_SENSOR_FAULT, venTemp ) } -#else - arterialPressure.data = ( ( (F32)(venPres - VENOUS_PRESSURE_OFFSET) * (VENOUS_PRESSURE_MAX_PSI - VENOUS_PRESSURE_MIN_PSI) / (F32)VENOUS_PRESSURE_SCALE ) + VENOUS_PRESSURE_MIN_PSI ) * PSI_TO_MMHG; - venousPressure.data = 100.0; -#endif // Filter inline pressure readings filterInlinePressureReadings( getMeasuredArterialPressure(), getMeasuredVenousPressure() ); @@ -525,7 +522,8 @@ { F32 artPres = getFilteredArterialPressure(); - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ARTERIAL_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) + // DEBUG_DENALI. FOR MAKING SURE THE ARTERIAL PRESSURE CHEKC DOES NOT LOOSE THE RACE + /*if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ARTERIAL_PRESSURE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) { // Check arterial pressure is in range if ( TRUE == isPersistentAlarmTriggered( ALARM_ID_HD_ARTERIAL_PRESSURE_OUT_OF_RANGE, @@ -563,7 +561,7 @@ isPersistentAlarmTriggered( ALARM_ID_ARTERIAL_PRESSURE_LOW, FALSE ); isPersistentAlarmTriggered( ALARM_ID_ARTERIAL_PRESSURE_HIGH, FALSE ); } - } + }*/ } /*********************************************************************//** @@ -871,15 +869,18 @@ { SELF_TEST_STATUS_T result = SELF_TEST_STATUS_PASSED; -#ifndef DISABLE_OCCLUSION_SELF_TEST - U32 const bpPressure = getMeasuredBloodPumpOcclusion(); - - if ( ( bpPressure <= CARTRIDGE_LOADED_THRESHOLD ) || ( bpPressure >= OCCLUSION_CARTRIDGE_LOADED_PRESSURE_READING_MAX ) ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_OCCLUSION_SELF_TEST ) != SW_CONFIG_ENABLE_VALUE ) +#endif { - activateAlarmNoData( ALARM_ID_NO_CARTRIDGE_LOADED ); - result = SELF_TEST_STATUS_FAILED; + U32 const bpPressure = getMeasuredBloodPumpOcclusion(); + + if ( ( bpPressure <= CARTRIDGE_LOADED_THRESHOLD ) || ( bpPressure >= OCCLUSION_CARTRIDGE_LOADED_PRESSURE_READING_MAX ) ) + { + activateAlarmNoData( ALARM_ID_NO_CARTRIDGE_LOADED ); + result = SELF_TEST_STATUS_FAILED; + } } -#endif return result; } Index: firmware/App/Controllers/Voltages.c =================================================================== diff -u -r9e85e7ace1390d48587174a5bc6eb11d5185cea4 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 9e85e7ace1390d48587174a5bc6eb11d5185cea4) +++ firmware/App/Controllers/Voltages.c (.../Voltages.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -212,18 +212,24 @@ { if ( ++voltageAlarmPersistenceCtr[ i ] >= VOLTAGES_ALARM_PERSISTENCE ) { -#ifndef DISABLE_VOLTAGE_MONITOR - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, (F32)i, volts ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VOLTAGES_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, (F32)i, volts ) + } } } else if ( volts < MIN_VOLTAGES[ i ] ) { if ( ++voltageAlarmPersistenceCtr[ i ] >= VOLTAGES_ALARM_PERSISTENCE ) { -#ifndef DISABLE_VOLTAGE_MONITOR - SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, (F32)i, volts ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_VOLTAGES_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_2_F32_DATA( ALARM_ID_HD_VOLTAGE_OUT_OF_RANGE, (F32)i, volts ) + } } } else Index: firmware/App/HDCommon.h =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -43,37 +43,19 @@ // #define DISABLE_FPGA_COUNTER_CHECKS 1 // Disable alarms associated with FPGA read/error counters // #define EMC_TEST_BUILD 1 // EMC test build - HD/DG run separately but connected, HD pumps toggle on/off w/ stop button #define DISABLE_WD_AND_SFTY_POST_TESTS 1 // Disable watchdog and safety shutdown POST tests - #define DISABLE_UI_POST_TEST 1 // Disable the UI POSTh + #define DISABLE_UI_POST_TEST 1 // Disable the UI POST // TODO convert the new configuration way -// #define DISABLE_ACCELS 1 // Disable accelerometer POST and monitoring // Implement // #define RUN_BP_OPEN_LOOP 1 // Run blood pump in open loop mode // Implement // #define RUN_DPI_OPEN_LOOP 1 // Run dialysate inlet pump in open loop mode // Implement // #define PBA_ESTIMATION 1 // Estimate arterial pressure rather than look at PBA sensor // Part of DVT build switch // #define USE_PBO_AS_PBA 1 // PBo readings used for PBA, PBo replaced with fixed pressure (100 mmHg) // Not needed -// #define DISABLE_UF_ALARMS 1 // Do not error on HD ultrafiltration checks // Implement // TODO implemented CHECK THE LAST ONE -// #define DISABLE_DIALYSATE_TEMP_CHECK 1 // Disable dialysate temperature check // Implement // TODO implemented - #define SKIP_CAL_CHECK 1 // Implement -// #define RUN_PUMPS_OPEN_LOOP 1 // BP and DPi pumps will be run open loop (no flow sensor feedback) // Not needed + #define SKIP_CAL_CHECK 1 // Implement TODO stays as a build switch until the calibration structure is updated -// #define ALARM_VOLUME_DEFAULT_LOW 1 // Set default alarm volume to lowest // Implement // TODO implemented - -// #define SKIP_AIR_BUBBLE_CHECK 1 // Skip air bubble detector self-test. // Implement // TODO implemented - #define DISABLE_OCCLUSION_SELF_TEST 1 // Skip occlusion sensor self-test. // Implement -// #define SKIP_CARTRIDGE_REMOVAL 1 // Skip cartridge removal check // Implement - - #define DISABLE_VOLTAGE_MONITOR 1 // Disable voltage monitoring/alarms // Implement - #define ALLOW_1_MIN_TREATMENT_DURATION 1 // Allow user to change treatment duration to as low as 1 minute // Implement +// #define ALLOW_1_MIN_TREATMENT_DURATION 1 // Allow user to change treatment duration to as low as 1 minute // Implement // #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps // Implement -// #define DISABLE_BUBBLE_ALARMS 1 // Disable bubble alarms // Implement // TODO implemented -// #define DISABLE_UI_COMM_TO_ALARM 1 // Disable UI comm timeouts // Implement - -// #define DISABLE_ILLEGAL_AIR_TRAP_ALARM 1 // Disable illegal state for air trap alarm // Implement // TODO implemented - #define SKIP_RESERVOIR_ALARMS 1 // Skip reservoir management alarms // Implement - - #include #include #endif Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -1049,12 +1049,12 @@ // Check UF rate over last hour if ( uFMeasRate > MAX_UF_RATE_ML_PER_HOUR ) { -#ifndef DISABLE_UF_ALARMS +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ULTRAFILTRATION_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { SET_ALARM_WITH_1_F32_DATA( ALARM_ID_UF_RATE_TOO_HIGH_ERROR, uFMeasRate ); } -#endif } // Increment timer and see if time to start another 1 hour check period if ( ++uFAccuracyCheckTimerCtr >= UF_ACCURACY_CHECK_INTERVAL ) @@ -1067,12 +1067,12 @@ // Check total UF volume error if ( ( fabs( refUFVolume - measUFVolume ) ) >= (F32)MAX_UF_ACCURACY_ERROR_ML ) { -#ifndef DISABLE_UF_ALARMS +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ULTRAFILTRATION_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { SET_ALARM_WITH_2_F32_DATA( ALARM_ID_UF_VOLUME_ACCURACY_ERROR, refUFVolume, measUFVolume ); } -#endif } } @@ -1091,21 +1091,21 @@ DG_RESERVOIR_ID_T activeRes = getDGActiveReservoir(); LOAD_CELL_ID_T loadCell = ( activeRes == DG_RESERVOIR_1 ? LOAD_CELL_RESERVOIR_1_PRIMARY : LOAD_CELL_RESERVOIR_2_PRIMARY ); F32 latestResVolume = getLoadCellWeight( loadCell ); -#ifndef DISABLE_UF_ALARMS - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ULTRAFILTRATION_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) - { - F32 deltaVolume = latestResVolume - resLastVolume[ activeRes ]; + F32 deltaVolume = latestResVolume - resLastVolume[ activeRes ]; - // ensure volume change is not too excessive - indication that load cell was impacted by some kind of shock - if ( fabs(deltaVolume) > MAX_ACTIVE_LOAD_CELL_CHANGE_G ) + // ensure volume change is not too excessive - indication that load cell was impacted by some kind of shock + if ( fabs(deltaVolume) > MAX_ACTIVE_LOAD_CELL_CHANGE_G ) + { +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ULTRAFILTRATION_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif { ALARM_ID_T deltaAlarm = ( getDGActiveReservoir() == DG_RESERVOIR_1 ? ALARM_ID_HD_LOAD_CELL_ACCELERATION_RES_1_ALARM : ALARM_ID_HD_LOAD_CELL_ACCELERATION_RES_2_ALARM ); SET_ALARM_WITH_1_F32_DATA( deltaAlarm, deltaVolume ); } } else -#endif { // Calculate UF volumes and provide to dialysate outlet pump controller measUFVolume = measUFVolumeFromPriorReservoirs + ( latestResVolume - resStartVolume[ activeRes ] ); Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r667feab319b14681a0330a715da7a1ba930b518d -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -240,11 +240,14 @@ break; case POST_STATE_ACCELEROMETER: -#ifndef DISABLE_ACCELS - testStatus = execAccelTest(); -#else + // TODO I don't like this testStatus = SELF_TEST_STATUS_PASSED; +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELEROMETERS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + testStatus = execAccelTest(); + } postState = handlePOSTStatus( testStatus ); break; Index: firmware/App/Modes/ModePostTreat.c =================================================================== diff -u -r667feab319b14681a0330a715da7a1ba930b518d -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) +++ firmware/App/Modes/ModePostTreat.c (.../ModePostTreat.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -435,11 +435,16 @@ *************************************************************************/ static HD_POST_TREATMENT_STATE_T handlePostTreatmentVerifyState( void ) { -#ifndef SKIP_CARTRIDGE_REMOVAL - BOOL isCartridgeRemoved = isCartridgeUnloaded(); -#else + // Assuming the cartridge door is removed already. + // This is used when the disable cartridge removal step software configuration is enabled BOOL isCartridgeRemoved = TRUE; + +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_CARTRIDGE_REMOVAL_STEP ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + isCartridgeRemoved = isCartridgeUnloaded(); + } if ( STATE_CLOSED == getFPGADoorState() ) { Index: firmware/App/Modes/SelfTests.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Modes/SelfTests.c (.../SelfTests.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -1177,12 +1177,14 @@ BUBBLE_STATUS_T const ADVBubbleStatus = getBubbleStatus( ADV ); -#ifndef SKIP_AIR_BUBBLE_CHECK - if ( ( ( BUBBLE_NOT_DETECTED == ADABubbleStatus ) && ( BUBBLE_NOT_DETECTED == ADVBubbleStatus ) ) || - ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SELF_TESTS_AIR_BUBBLE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) ) -#endif + + if ( BUBBLE_NOT_DETECTED == ADVBubbleStatus ) { - if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_SELF_TEST ) != SW_CONFIG_ENABLE_VALUE ) +#ifndef _RELEASE_ + // TODO do we need both of these? + if ( ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_BLOOD_LEAK_SELF_TEST ) != SW_CONFIG_ENABLE_VALUE ) && + ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_SELF_TESTS_AIR_BUBBLE_CHECK ) != SW_CONFIG_ENABLE_VALUE ) ) +#endif { zeroBloodLeak(); } Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -115,12 +115,8 @@ static OVERRIDE_U32_T alarmStatusPublishInterval = { ALARM_STATUS_PUBLISH_INTERVAL, ALARM_STATUS_PUBLISH_INTERVAL, ALARM_STATUS_PUBLISH_INTERVAL, 0 }; /// Interval (in task intervals) at which to publish alarm information to CAN bus. static OVERRIDE_U32_T alarmInfoPublishInterval = { ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, 0 }; -//#ifndef ALARM_VOLUME_DEFAULT_LOW // DEBUG_DENALI -/// Set alarm audio volume attenuation level (0..4 - lower level = higher gain). -//static OVERRIDE_U32_T alarmAudioVolumeLevel = { MIN_ALARM_VOLUME_ATTENUATION, MIN_ALARM_VOLUME_ATTENUATION, MIN_ALARM_VOLUME_ATTENUATION, 0 }; -//#else static OVERRIDE_U32_T alarmAudioVolumeLevel = { MAX_ALARM_VOLUME_ATTENUATION, MAX_ALARM_VOLUME_ATTENUATION, MAX_ALARM_VOLUME_ATTENUATION, 0 }; -//#endif + /// Alarm audio current (high gain) measured at ADC. static OVERRIDE_F32_T alarmPrimaryAudioCurrentHG = { 0.0, 0.0, 0.0, 0 }; /// Alarm audio current (low gain) measured at ADC. @@ -1204,11 +1200,13 @@ { U32 result = alarmAudioVolumeLevel.data; +#ifndef _RELEASE_ // Check the software configurations if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_ENABLE_ALARM_VOLUME_DEFAULT_LOW ) ) { result = MIN_ALARM_VOLUME_ATTENUATION; } +#endif if ( OVERRIDE_KEY == alarmAudioVolumeLevel.override ) { Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r667feab319b14681a0330a715da7a1ba930b518d -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 667feab319b14681a0330a715da7a1ba930b518d) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -10,6 +10,7 @@ #include "MessageSupport.h" #include "ModeTreatment.h" #include "ModeTreatmentParams.h" +#include "NVDataMgmt.h" #include "OperationModes.h" #include "Reservoirs.h" #include "TaskGeneral.h" @@ -241,9 +242,12 @@ // Check if the time that the reservoir has been use has exceeded the limit if ( TRUE == didTimeout( timeReservoirInUseMS, MAX_RESERVOIR_DEPLETION_TIME_MS ) ) { -#ifndef SKIP_RESERVOIR_ALARMS - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_DEPLETION_TIME_OUT, calcTimeSince( timeReservoirInUseMS ) ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_RESERVOIRS_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_DEPLETION_TIME_OUT, calcTimeSince( timeReservoirInUseMS ) ) + } } } @@ -549,9 +553,13 @@ // diluted to much if ( recirculationLevelPct >= MAX_RESERVOIR_RECIRCULATION ) { -#ifndef SKIP_RESERVOIR_ALARMS - SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_RECIRCULATION_OUT_OF_RANGE, recirculationLevelPct ) +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_RESERVOIRS_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_1_F32_DATA( ALARM_ID_HD_ACTIVE_RESERVOIR_RECIRCULATION_OUT_OF_RANGE, recirculationLevelPct ) + } + } // Check if DG has moved out of the fill mode Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -753,9 +753,12 @@ { if ( TRUE == didTimeout( timeOfLastUICheckIn, UI_COMM_TIMEOUT_IN_MS ) ) { -#ifndef DISABLE_UI_COMM_TO_ALARM - activateAlarmNoData( ALARM_ID_UI_COMM_TIMEOUT ); -#endif +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UI_COMM_ALARMS ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + activateAlarmNoData( ALARM_ID_UI_COMM_TIMEOUT ); + } } if ( TRUE == didTimeout( timeOfLastDGCheckIn, DG_COMM_TIMEOUT_IN_MS ) ) Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r29a2c3c7d7618489c0ada9f98e1d30226b455392 -r2a3a47ca90ad19851a30c52f6999a56d5f578783 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 29a2c3c7d7618489c0ada9f98e1d30226b455392) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 2a3a47ca90ad19851a30c52f6999a56d5f578783) @@ -102,10 +102,14 @@ // Monitor air bubble detectors execBubbles(); -#ifndef DISABLE_ACCELS - // Monitor accelerometer - execAccel(); +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELEROMETERS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + // Monitor accelerometer + execAccel(); + } + // Exec and monitor valves execValves(); #endif