Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r93774c1a907fb9ce8e5c784e77ed3483c04a525b -re6fef0f312d07e308c88caafef7e952689328248 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 93774c1a907fb9ce8e5c784e77ed3483c04a525b) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision e6fef0f312d07e308c88caafef7e952689328248) @@ -1402,6 +1402,7 @@ BOOL testConcentratePumpStartStopOverride( MESSAGE_T *message ) { BOOL result = FALSE; + BOOL speedRangeCheck = FALSE; // Verify tester has logged in with DD if ( TRUE == isTestingActivated() ) @@ -1415,10 +1416,10 @@ if ( (CONCENTRATE_PUMPS_T)payload.pumpID < NUM_OF_CONCENTRATE_PUMPS ) { + speedRangeCheck = ( payload.speed >= CONCENTRATE_PUMP_MIN_SPEED ) && ( payload.speed <= CONCENTRATE_PUMP_MAX_SPEED ); + // Handle start command - if ( ( TRUE == payload.startStop ) && - ( ( payload.speed >= CONCENTRATE_PUMP_MIN_SPEED ) && ( payload.speed <= CONCENTRATE_PUMP_MAX_SPEED ) ) && - ( payload.volume > 0.0 ) ) + if ( ( TRUE == payload.startStop ) && ( TRUE == speedRangeCheck ) && ( payload.volume > 0.0 ) ) { setConcentratePumpTargetSpeed( (CONCENTRATE_PUMPS_T)payload.pumpID, payload.speed, payload.volume ); requestConcentratePumpOn ( (CONCENTRATE_PUMPS_T)payload.pumpID ); Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -re163e9faf44d2eb475188b8ea4d6a3befb6e753f -re6fef0f312d07e308c88caafef7e952689328248 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e163e9faf44d2eb475188b8ea4d6a3befb6e753f) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision e6fef0f312d07e308c88caafef7e952689328248) @@ -56,9 +56,6 @@ #define MAX_ADJ_DELTA_TEMP_C 7.0F ///< Maximum adjusted delta temperature to add/remove from calculated target temperature #define D5_HEAT_TX_INIT_FEED_FORWARD 0.0F ///< Initial Feed forward term for heater control -//#define D5_HEAT_TX_P_COEFFICIENT 0.050F ///< P Term for AC primary heater control during treatment mode. -//#define D5_HEAT_TX_I_COEFFICIENT 0.015F ///< I Term for AC primary heater control during treatment mode. - #define D5_HEAT_TX_P_COEFFICIENT 0.035F ///< P Term for AC primary heater control during treatment mode. #define D5_HEAT_TX_I_COEFFICIENT 0.004F ///< I Term for AC primary heater control during treatment mode. @@ -79,12 +76,11 @@ #define HEATERS_MAX_VOLTAGE_OUT_OF_RANGE_TOL 0.2F ///< Heaters max voltage out of range tolerance. #define D5_HEATER_DEADBAND_CONTROL 0.1F ///< Heater deadband range for conrtol. -//#define D5_HEAT_CONTROL_INTERVAL_MS 30000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_MS 3000 /// Primary heater control interval in milli seconds #define D5_HEAT_CONTROL_INTERVAL_COUNT ( D5_HEAT_CONTROL_INTERVAL_MS / TASK_GENERAL_INTERVAL ) ///< Primary heater control interval count. #define D45_HEAT_CONTROL_INTERVAL_MS ( 1 * MS_PER_SECOND ) ///< Trimmer heater control interval in milli seconds #define D45_HEAT_CONTROL_INTERVAL_COUNT ( D45_HEAT_CONTROL_INTERVAL_MS / TASK_GENERAL_INTERVAL ) ///< Trimmer heater control interval count. -#define D5_TARGET_TEMP_ADJUST_INTERVAL_MS ( 3 * SEC_PER_MIN * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Adjust primary target temperature +#define D5_TARGET_TEMP_ADJUST_INTERVAL_MS ( 3 * SEC_PER_MIN * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Adjust primary target temperature #define PRIMARY_HEATER_MAX_PWR_WATTS 1400.0F ///< AC Primary Heater Max Power consumeption in Watts #define TX_PRIMARY_HEATER_MAX_PWR_WATTS 700.0F ///< Estimated power to be supplied to the primary heater during treatement mode #define HEAT_PRIMARY_HEATER_MAX_PWR_WATTS 980.0F ///< Estimated power to be supplied to the primary heater during heat disinfect mode Index: firmware/App/Monitors/Temperature.c =================================================================== diff -u -re163e9faf44d2eb475188b8ea4d6a3befb6e753f -re6fef0f312d07e308c88caafef7e952689328248 --- firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision e163e9faf44d2eb475188b8ea4d6a3befb6e753f) +++ firmware/App/Monitors/Temperature.c (.../Temperature.c) (revision e6fef0f312d07e308c88caafef7e952689328248) @@ -95,7 +95,7 @@ static F32 d4TempSamplesC[ D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ]; ///< D4 temperature samples array in C. static U32 d4TempSamplesNextIndex; ///< D4 temperature sample next index number. static U32 d4TempCount; ///< D4 Number of samples in average buffer. -static U32 tempDataColTimeInterval; ///< Temperature data collection time interval in milliseconds. +static U32 tempDataCollectionTimeInterval; ///< Temperature data collection time interval in milliseconds. static U32 d4TempSampleIntervalCounter; ///< D4 temperature sensor sample collection timer counter. static U32 d50TempSampleIntervalCounter; ///< D50 temperature sensor sample collection timer counter. @@ -154,7 +154,7 @@ d4TempSampleIntervalCounter = 0; d50TempSampleIntervalCounter = 0; d99TempSampleIntervalCounter = 0; - tempDataColTimeInterval = 0; + tempDataCollectionTimeInterval = 0; tempDriftEventCheck = FALSE; dialTempMovingAvgData[ DIAL_TEMP_D28 ].dialTempColHasTimerBeenSet = FALSE; @@ -311,7 +311,7 @@ static void filterTemperatureReadings( void ) { // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d4TempSampleIntervalCounter >= tempDataColTimeInterval ) + if ( ++d4TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) { // Filter D4 Temperature for AC heater if ( d4TempCount >= D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) @@ -329,7 +329,7 @@ } // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d50TempSampleIntervalCounter >= tempDataColTimeInterval ) + if ( ++d50TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) { if ( d50TempCount >= D50_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) { @@ -347,7 +347,7 @@ // Moving average sample collection interval varies based on the dialysate flow rate - if ( ++d99TempSampleIntervalCounter >= tempDataColTimeInterval ) + if ( ++d99TempSampleIntervalCounter >= tempDataCollectionTimeInterval ) { // Filter D99 Temperature for fresh dialysate temperature @@ -498,7 +498,7 @@ U32 sampleInterval = (U32)( ( period / (F32)D4_TEMP_MOVING_AVG_NUM_OF_SAMPLES ) * MS_PER_SECOND ); - tempDataColTimeInterval = (U32) ( sampleInterval / TASK_PRIORITY_INTERVAL ); + tempDataCollectionTimeInterval = (U32) ( sampleInterval / TASK_PRIORITY_INTERVAL ); } /*********************************************************************//**