Index: firmware/App/DGCommon.h =================================================================== diff -u -rec51d9983ff34037b26a884fa3880396f90a00f6 -r2f13a0f53d8081b6be32a7aae0d4c287ac31e2f3 --- firmware/App/DGCommon.h (.../DGCommon.h) (revision ec51d9983ff34037b26a884fa3880396f90a00f6) +++ firmware/App/DGCommon.h (.../DGCommon.h) (revision 2f13a0f53d8081b6be32a7aae0d4c287ac31e2f3) @@ -32,37 +32,39 @@ #ifndef _RELEASE_ #ifndef _VECTORCAST_ // TODO: Removed debug build flags when release build is ready -// #define BOARD_WITH_NO_HARDWARE 1 // Build switch -// #define TASK_TIMING_OUTPUT_ENABLED 1 // Build switch // re-purposes drain pump enable pin for task timing -// #define DISABLE_HEATERS_AND_TEMPS 1 // Implement -// #define DISABLE_ACCELS 1 // Implement -// #define SKIP_POST 1 // Not needed - #define SKIP_CAL_CHECK 1 // Implement -// #define ENABLE_DIP_SWITCHES 1 // Not needed -// #define EMC_TEST_BUILD 1 // Build switch - #define ALARMS_DEBUG 1 // Not needed -// #define HEATERS_DEBUG 1 // Not needed -// #define PRESSURES_DEBUG 1 // Not needed - // #define IGNORE_DRAIN_PUMP_MONITOR 1 // Build switch - #define IGNORE_HEATERS_MONITOR 1 // Build switch - #define IGNORE_RO_PUMP_MONITOR 1 // Build switch - #define DISABLE_RO_RATIO_CHECK 1 // Implement - #define DISABLE_COND_SENSOR_CHECK 1 // Disabled for Tom // Implement - #define DISABLE_WATER_QUALITY_CHECK 1 // Disabled for Tom // Implement - #define DISABLE_RTC_CONFIG 1 // Not needed - #define THD_USING_TRO_CONNECTOR 1 // Build switch - #define DISABLE_FLOW_CHECK_IN_FILL 1 // Implement - #define IGNORE_CONC_PUMP_IN_HEAT_DISINFECT 1 // Not needed -// #define NEW_FMD_FLOW_SENSOR 1 // Not needed - #define DISABLE_HEATERS_EFFICIENCY 1 - +// #define BOARD_WITH_NO_HARDWARE 1 +// #define TASK_TIMING_OUTPUT_ENABLED 1 // re-purposes drain pump enable pin for task timing +// #define DISABLE_HEATERS_AND_TEMPS 1 + #define DISABLE_ACCELS 1 +// #define SKIP_POST 1 + #define SKIP_CAL_CHECK 1 +// #define ENABLE_DIP_SWITCHES 1 +// #define EMC_TEST_BUILD 1 + #define ALARMS_DEBUG 1 +// #define HEATERS_DEBUG 1 +// #define PRESSURES_DEBUG 1 + // #define IGNORE_DRAIN_PUMP_MONITOR 1 + #define IGNORE_HEATERS_MONITOR 1 + #define IGNORE_RO_PUMP_MONITOR 1 + #define DISABLE_RO_RATIO_CHECK 1 + #define DISABLE_COND_SENSOR_CHECK 1 // Disabled for Tom +// #define DISABLE_WATER_QUALITY_CHECK 1 // Disabled for Tom + #define DISABLE_RTC_CONFIG 1 + #define THD_USING_TRO_CONNECTOR 1 + #define DISABLE_FLOW_CHECK_IN_FILL 1 + #define IGNORE_CONC_PUMP_IN_HEAT_DISINFECT 1 +// #define NEW_FMD_FLOW_SENSOR 1 #define DISABLE_COND_STATUS_CHECK 1 /// Build switch + #define DISABLE_DISINFECT_CONDUCTIVITY 1 // Implement // #define DISABLE_CONC_PUMPS 1 // #define DISABLE_CAP_SWITCHES 1 // Implement // #define DISABLE_UV_REACTORS 1 #define DISABLE_ACID_BICARB_ALARMS 1 // Implement + #define DISABLE_PRIME_CONCENT_LINES 1 + #define DISABLE_BICARB_CONDUCTIVITY_TEST 1 + #define DISABLE_ACID_CONDUCTIVITY_TEST 1 // Turn these flags on to disable dialysate mixing #define DISABLE_DIALYSATE_CHECK 1 // Disabled for Tom // Implement // #define DISABLE_MIXING 1 // Implement Index: firmware/App/Modes/ModeDrain.c =================================================================== diff -u -rdf73b890557a3e0b7a6570af37f69de169783287 -r2f13a0f53d8081b6be32a7aae0d4c287ac31e2f3 --- firmware/App/Modes/ModeDrain.c (.../ModeDrain.c) (revision df73b890557a3e0b7a6570af37f69de169783287) +++ firmware/App/Modes/ModeDrain.c (.../ModeDrain.c) (revision 2f13a0f53d8081b6be32a7aae0d4c287ac31e2f3) @@ -19,6 +19,7 @@ #include "ConductivitySensors.h" #include "DrainPump.h" #include "Heaters.h" +#include "ModeFill.h" #include "ModeDrain.h" #include "OperationModes.h" #include "Pressures.h" @@ -244,6 +245,19 @@ setValveState( VRD2, VALVE_STATE_CLOSED ); } + // check for empty bottles at the end of drain + if ( TRUE == isEmptyAcidBottle() ) // is acid volume < 10% + { + setThisFisrtFillFlag( TRUE ); // indicates bottles need prime + activateAlarmNoData( ALARM_ID_DG_ACID_BOTTLE_LOW_VOLUME ); // trigger empty acid bottle alarm + } + + if ( TRUE == isEmptyBicarbBottle() ) + { + setThisFisrtFillFlag( TRUE ); + activateAlarmNoData( ALARM_ID_DG_BICARB_BOTTLE_LOW_VOLUME ); + } + if ( TRUE == isReservoirTarePending() ) { // Tare reservoir load cells at empty if requested result = DG_DRAIN_STATE_TARE; @@ -253,9 +267,7 @@ requestNewOperationMode( DG_MODE_GENE ); } } - - // Drain timed out raise the alarm - if ( TRUE == didTimeout( dialysateDrainStartTime, DIALYSATE_DRAIN_TIME_OUT ) ) + else if ( TRUE == didTimeout( dialysateDrainStartTime, DIALYSATE_DRAIN_TIME_OUT ) ) // Drain timed out raise the alarm { activateAlarmNoData( ALARM_ID_DG_DIALYSATE_DRAIN_TIME_OUT ); }