Index: firmware/App/Controllers/BloodLeak.c =================================================================== diff -u -r514463982373eb976e4b48a27d0f85f56e014920 -r45d5a981853e5b4fd6a7c69fd4797bd782983979 --- firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 514463982373eb976e4b48a27d0f85f56e014920) +++ firmware/App/Controllers/BloodLeak.c (.../BloodLeak.c) (revision 45d5a981853e5b4fd6a7c69fd4797bd782983979) @@ -454,7 +454,7 @@ { BLOOD_LEAK_STATES_T state = BLOOD_LEAK_SELF_TEST_STATE; -#ifndef IGNORE_BLOOD_LEAK_ALARM +#ifndef IGNORE_BLOOD_LEAK_SELF_TEST if ( SELF_TEST_STATUS_IN_PROGRESS == bloodLeakSelfTestStatus ) { if ( FALSE == noFPGABloodLeakDetected() ) // Faked blood leak caused by independent MCU board @@ -465,8 +465,9 @@ else if ( TRUE == didTimeout( bloodLeakSelfTestStartTime, BLOOD_LEAK_TIMEOUT_MS ) ) { bloodLeakSelfTestStatus = SELF_TEST_STATUS_FAILED; - +#ifndef IGNORE_BLOOD_LEAK_ALARM activateAlarmNoData( ALARM_ID_HD_BLOOD_LEAK_SELF_TEST_FAILURE ); +#endif } } else Index: firmware/App/HDCommon.h =================================================================== diff -u -r514463982373eb976e4b48a27d0f85f56e014920 -r45d5a981853e5b4fd6a7c69fd4797bd782983979 --- firmware/App/HDCommon.h (.../HDCommon.h) (revision 514463982373eb976e4b48a27d0f85f56e014920) +++ firmware/App/HDCommon.h (.../HDCommon.h) (revision 45d5a981853e5b4fd6a7c69fd4797bd782983979) @@ -10,8 +10,8 @@ * @author (last) Dara Navaei * @date (last) 04-Jan-2022 * -* @author (original) Sean -* @date (original) 27-Feb-2020 +* @author (original) Sean +* @date (original) 27-Feb-2020 * ***************************************************************************/ @@ -25,7 +25,7 @@ #define HD_VERSION_MAJOR 0 #define HD_VERSION_MINOR 6 #define HD_VERSION_MICRO 0 -#define HD_VERSION_BUILD 31 +#define HD_VERSION_BUILD 173 // ********** development build switches ********** @@ -49,21 +49,21 @@ // #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) -// #define PBA_ESTIMATION 1 // Estimate arterial pressure rather than look at PBA sensor + #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 #define DISABLE_PUMP_FLOW_CHECKS 1 // Do not error on HD pump flow checks #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 #define ALWAYS_ALLOW_SYRINGE_PUMP_CMDS 1 // Allow syringe pump commands at any time except when pump is busy #define DISABLE_PRESSURE_CHECKS 1 // Do not error on HD pressure checks - #define DISABLE_ARTERIAL_PRESSURE_CHECK 1 // Do not error on arterial pressure out of range - #define DISABLE_VENOUS_PRESSURE_CHECK 1 // Do not error on venous pressure out of range +// #define DISABLE_ARTERIAL_PRESSURE_CHECK 1 // Do not error on arterial pressure out of range +// #define DISABLE_VENOUS_PRESSURE_CHECK 1 // Do not error on venous pressure out of range // #define DISABLE_UF_ALARMS 1 // Do not error on HD ultrafiltration checks #define DISABLE_DIALYSATE_TEMP_CHECK 1 // Disable dialysate temperature check // #define DISABLE_VALVE_ALARMS 1 // Do not error on HD valve position - #define SKIP_CAL_CHECK 1 + #define SKIP_CAL_CHECK 1 // // #define RUN_PUMPS_OPEN_LOOP 1 // BP and DPi pumps will be run open loop (no flow sensor feedback) // #define READ_FPGA_ASYNC_DATA 1 // Test build reads non-priority register page every other time // #define EMC_TEST_BUILD 1 // EMC test build - HD/DG run separately but connected, HD pumps toggle on/off w/ stop button @@ -77,7 +77,7 @@ #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 -// #define NO_PUMP_FLOW_LIMITS 1 // Allow any commanded flow rate for peristaltic pumps + #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 Index: firmware/App/Services/Reservoirs.c =================================================================== diff -u -r9c785a779da348df1c066ae0da2d0f53de7ea936 -r45d5a981853e5b4fd6a7c69fd4797bd782983979 --- firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 9c785a779da348df1c066ae0da2d0f53de7ea936) +++ firmware/App/Services/Reservoirs.c (.../Reservoirs.c) (revision 45d5a981853e5b4fd6a7c69fd4797bd782983979) @@ -71,8 +71,12 @@ static F32 previousUFFlowMLP = 0.0; ///< Previous ultrafiltration flow rate in mL/min. static DG_MIXING_RATIOS_T ratios; ///< Mixing ratios and fill prep time in milliseconds structure. -static const F32 RESERVOIR_DILUTION_RATIO = MAX_RESERVOIR_DILUTION / ( 1.0 - MAX_RESERVOIR_DILUTION ); +static const F32 RESERVOIR_DILUTION_RATIO = MAX_RESERVOIR_DILUTION / ( 1.0 - MAX_RESERVOIR_DILUTION ); ///< Reservoir dilution ratio. +// TODO remove +static BOOL test = FALSE; +// TODO remove + // ********** private function prototypes ********** // Reservoir management functions @@ -124,6 +128,10 @@ ratios.acidMixingRatio = 0.0; ratios.bicarbMixingRatio = 0.0; ratios.timeFillPrepMS = 0; + + // TODO remove + test = FALSE; + // TODO remove } /*********************************************************************//** @@ -575,7 +583,7 @@ 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 ) /*&& ( FALSE == test )*/ ) { DG_RESERVOIR_ID_T inactiveRes = getDGInactiveReservoir(); @@ -595,6 +603,9 @@ reservoirSwitchStartTimeMS = getMSTimerCount(); state = TREATMENT_RESERVOIR_MGMT_WAIT_FOR_SWITCH_SETTLE_STATE; + + // This is to make sure the active reservoir stays as 2 + test = TRUE; } return state; Index: firmware/App/Tasks/TaskPriority.c =================================================================== diff -u -r514463982373eb976e4b48a27d0f85f56e014920 -r45d5a981853e5b4fd6a7c69fd4797bd782983979 --- firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 514463982373eb976e4b48a27d0f85f56e014920) +++ firmware/App/Tasks/TaskPriority.c (.../TaskPriority.c) (revision 45d5a981853e5b4fd6a7c69fd4797bd782983979) @@ -94,9 +94,10 @@ // Monitor fluid leak detector execFluidLeak(); +#ifndef IGNORE_BLOOD_LEAK_SELF_TEST // Monitor blood leak detector execBloodLeak(); - +#endif // Monitor air bubble detectors execBubbles();