Index: firmware/App/Controllers/ConductivitySensors.c =================================================================== diff -u -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) +++ firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -55,6 +55,7 @@ #define MAX_CONDUCTIVITY_SENSOR_FAILURE_WINDOW_MS ( 60 * MS_PER_SECOND ) ///< Conductivity sensor error window. #define RO_REJECTION_RATIO_OUT_OF_RANGE_VALUE 1.0F ///< Out of range value for RO rejection ratio when CPi conductivity is zero. + #define MAX_RO_REJECTION_RATIO_ALLOW 0.10F ///< Maximum RO rejection ratio. #define MAX_CPO_CONDUCTIVITY_ALLOW 30.0 ///< Maximum CPo sensor conductivity value. @@ -154,6 +155,7 @@ initTimeWindowedCount( TIME_WINDOWED_COUNT_FPGA_CONDUCTIVITY_SENSOR_ERROR, MAX_CONDUCTIVITY_SENSOR_FAILURES, MAX_CONDUCTIVITY_SENSOR_FAILURE_WINDOW_MS ); initPersistentAlarm( ALARM_ID_INLET_WATER_HIGH_CONDUCTIVITY, COND_SENSOR_PERSISTENCE_PERIOD, COND_SENSOR_PERSISTENCE_PERIOD ); + initPersistentAlarm( ALARM_ID_INLET_WATER_CONDUCTIVITY_IN_HIGH_RANGE, COND_SENSOR_PERSISTENCE_PERIOD, COND_SENSOR_PERSISTENCE_PERIOD ); initPersistentAlarm( ALARM_ID_INLET_WATER_CONDUCTIVITY_IN_LOW_RANGE, COND_SENSOR_PERSISTENCE_PERIOD, COND_SENSOR_PERSISTENCE_PERIOD ); initPersistentAlarm( ALARM_ID_RO_REJECTION_RATIO_OUT_OF_RANGE, RO_REJECTION_RATIO_PERSISTENCE_PERIOD, RO_REJECTION_RATIO_PERSISTENCE_PERIOD ); @@ -241,11 +243,9 @@ /*********************************************************************//** * @brief * The checkInletWaterConductivity function checks inlet water conductivity value - * and triggers an alarm when conductivity value is not within the specified - * values. + * and triggers an alarm when conductivity value is out of allowed range. * @details Inputs: CPi sensor conductivity - * @details Outputs: Trigger warning alarm if conductivity is in the warning - * range. Trigger alarm if conductivity is below minimum conductivity. + * @details Outputs: Trigger alarms when conductivity is out of allowed range * @return none *************************************************************************/ void checkInletWaterConductivity( void ) Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -rbcb768dd6a13286e028533394916a9f69c9f254f -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision bcb768dd6a13286e028533394916a9f69c9f254f) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -172,6 +172,7 @@ { if( heater < NUM_OF_DG_HEATERS ) { +#ifndef DISABLE_HEATERS_AND_TEMPS // Assume the target temperature has not changed heatersStatus[ heater ].hasTargetTempChanged = FALSE; @@ -182,6 +183,7 @@ heatersStatus[ heater ].hasTargetTempChanged = TRUE; // TODO alarm if temperature if out of range or just reject? } +#endif } else { @@ -213,13 +215,16 @@ { BOOL status = FALSE; + if( heater < NUM_OF_DG_HEATERS ) { +#ifndef DISABLE_HEATERS_AND_TEMPS if ( TRUE == heatersStatus[ heater ].hasTargetTempChanged ) { status = TRUE; heatersStatus[ heater ].startHeaterSignal = TRUE; } +#endif } else { Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -rbcb768dd6a13286e028533394916a9f69c9f254f -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision bcb768dd6a13286e028533394916a9f69c9f254f) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -95,7 +95,7 @@ * @details Outputs: LoadCell module initialized. * @return none *************************************************************************/ - void initLoadCell( void ) +void initLoadCell( void ) { U32 i; U32 j; Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rbcb768dd6a13286e028533394916a9f69c9f254f -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision bcb768dd6a13286e028533394916a9f69c9f254f) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -371,12 +371,11 @@ measuredROFlowRateLPM.data = flow - ( getMeasuredPumpSpeed( CONCENTRATEPUMPS_CP1_ACID ) / ML_PER_LITER ) - ( getMeasuredPumpSpeed( CONCENTRATEPUMPS_CP2_BICARB ) / ML_PER_LITER ); - // If the flow is less than a certain value, FPGA will return 0xFFFF meaning that - // the flow is 0. - if ( FLOW_SENSOR_ZERO_READING == roFlowReading ) - { - measuredROFlowRateLPM.data = 0.0; - } + // If the flow is less than a certain value, FPGA will return 0xFFFF meaning that the flow is 0. + if ( FLOW_SENSOR_ZERO_READING == roFlowReading ) + { + measuredROFlowRateLPM.data = 0.0; + } measuredFlowReadingsSum = 0; flowFilterCounter = 0; Index: firmware/App/Modes/ModeFlush.c =================================================================== diff -u -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) +++ firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -49,14 +49,15 @@ #define DRAIN_WEIGHT_UNCHANGE_TIMEOUT ( 6 * MS_PER_SECOND ) ///< Time period of unchanged weight during draining before timeout. // Flush drain path state defines -#define FLUSH_DRAIN_WAIT_TIME_MS ( 2 * MS_PER_SECOND ) ///< Flush Drain path wait time in milliseconds. TODo it was 2 minutes +#define FLUSH_DRAIN_WAIT_TIME_MS ( 2 * 60 * MS_PER_SECOND ) ///< Flush Drain path wait time in milliseconds. // Flush dialysate state defines #define FLUSH_DIALYSATE_WAIT_TIME_MS ( 0.5F * 60 * MS_PER_SECOND ) ///< Flush dialysate wait time in milliseconds. // Flush concentrate straws state defines #define FLUSH_CONCENTRATE_STRAWS_TIME_MS ( 0.5F * 60 * MS_PER_SECOND ) ///< Flush concentrate straws wait time in milliseconds. todo was 3 minutes #define ACID_PUMP_SPEED_ML_PER_MIN -30.0F ///< Acid pump speed in mL/min. + // The bicarb pump is 2% faster than the acid pump to create a flow from acid to bicarb line during flush #define BICARB_PUMP_SPEED_ML_PER_MIN 30.6F ///< Bicarb pump speed in mL/min. @@ -306,6 +307,7 @@ // Close VPi to prevent wasting water setValveState( VPI, VALVE_STATE_CLOSED ); + // Set the actuators to drain R1 setValveState( VRD1, VALVE_STATE_OPEN ); Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -rab14e70c7bac24b0c3ebd02c6763285cdd3951ce -rf4a444de1b2b78922a911448a65cfcc8677f86cb --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision ab14e70c7bac24b0c3ebd02c6763285cdd3951ce) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision f4a444de1b2b78922a911448a65cfcc8677f86cb) @@ -1122,11 +1122,11 @@ break; case MSG_ID_FILTER_FLUSH_TIME_PERIOD_OVERRIDE: - handleFilterFlushTimePeriodOverride( message ); + handleFilterFlushTimePeriodOverride(message); break; - case MSG_ID_DG_FANS_RPM_OVERRIDE: - handleFansRPMOverride( message ); + case MSG_ID_DG_BLOCK_MESSAGE_TRANSMISSION: + handleTestBlockMessagesRequest( message ); break; case MSG_ID_DG_STOP_RTC_CLOCK: @@ -1137,10 +1137,6 @@ handleSetDrainPumpMeasuredRPMOverrideRequest( message ); break; - case MSG_ID_DG_BLOCK_MESSAGE_TRANSMISSION: - handleTestBlockMessagesRequest( message ); - break; - case MSG_ID_DG_SUPER_CLEAR_ALARMS_CMD: handleTestSuperClearAlarmsRequest( message ); break; @@ -1153,6 +1149,10 @@ handleTestFansRPMAlarmStartTimeOffsetRequest( message ); break; + case MSG_ID_DG_FANS_RPM_OVERRIDE: + handleFansRPMOverride( message ); + break; + case MSG_ID_DG_USED_ACID_VOLUME_ML_OVERRIDE: handleTestUsedAcidVolumeMLOverrideRequest( message ); break;