Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r609d5c77e1f5bd85e9dd1a90b786e56004a79f06 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 609d5c77e1f5bd85e9dd1a90b786e56004a79f06) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -55,7 +55,9 @@ #define CONCENTRATE_PUMP_VOLUME_PER_PULSE ( CONCENTRATE_PUMP_VOLUME_PER_REV / CONCENTRATE_PUMP_PULSE_PER_REV ) #define CONCENTRATE_PUMP_DATA_PUBLISH_INTERVAL ( 500 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the concentrate pump is monitored. + #define CONCENTRATE_PUMP_CONTROL_INTERVAL ( 50 / TASK_GENERAL_INTERVAL ) ///< Interval (ms/task time) at which the concentrate pump is controlled. + #define CONCENTRATE_PUMP_SPEED_CONTROL_PERSISTENCE_PERIOD ( 5 * MS_PER_SECOND ) ///< Persistence period for concentrate pump speed control error. #define NUMBER_OF_ACID_AND_BICARB_NV_DATA_TO_CHECK 1 ///< Number of acid and bicarb non-volatile data to check. Index: firmware/App/Controllers/ConductivitySensors.c =================================================================== diff -u -rcc182c9aab4b832305e682ebabe855ddec1a6a28 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision cc182c9aab4b832305e682ebabe855ddec1a6a28) +++ firmware/App/Controllers/ConductivitySensors.c (.../ConductivitySensors.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -421,7 +421,7 @@ EMSTAT_VARIABLE_T const * const measurementPtr = (EMSTAT_VARIABLE_T *)&package; U32 const status = hexStrToDec( (U08 *)&measurementPtr->status, sizeof( measurementPtr->status ) ); - if ( EMSTAT_PICO_GOOD_STATUS == status ) + // if ( EMSTAT_PICO_GOOD_STATUS == status ) { U32 const prefix = prefixStrToSIFactor( measurementPtr->prefix ); F32 const resistance = ( ( F32 )( hexStrToDec( measurementPtr->value, sizeof( measurementPtr->value ) ) - EMSTAT_PICO_MEASUREMENT_OFFSET ) / prefix ); @@ -434,11 +434,11 @@ rawConductivityValues[ sensorId ] = conductivity; // store raw conductivity data from CD1 and CD2 } - else + /*else { compensatedConductivityValues[ sensorId ].data = 0.0; rawConductivityValues[ sensorId ] = 0.0; - } + }*/ if ( EMSTAT_PICO_TIMING_NOT_MET_STATUS == status ) { Index: firmware/App/Controllers/Heaters.c =================================================================== diff -u -r02654dc5b372b3af948ebd28aabb95cc4b51c785 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 02654dc5b372b3af948ebd28aabb95cc4b51c785) +++ firmware/App/Controllers/Heaters.c (.../Heaters.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -174,6 +174,7 @@ { if( heater < NUM_OF_DG_HEATERS ) { +#ifndef DISABLE_HEATERS_AND_TEMPS // Assume the target temperature has not changed heatersStatus[ heater ].hasTargetTempChanged = FALSE; @@ -184,6 +185,7 @@ heatersStatus[ heater ].hasTargetTempChanged = TRUE; // TODO alarm if temperature if out of range or just reject? } +#endif } else { @@ -215,13 +217,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/ROPump.c =================================================================== diff -u -r250f7f30b65a740ae957606f144437aee050a4f1 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 250f7f30b65a740ae957606f144437aee050a4f1) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -366,12 +366,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/Controllers/Switches.c =================================================================== diff -u -r02654dc5b372b3af948ebd28aabb95cc4b51c785 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Controllers/Switches.c (.../Switches.c) (revision 02654dc5b372b3af948ebd28aabb95cc4b51c785) +++ firmware/App/Controllers/Switches.c (.../Switches.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -95,15 +95,15 @@ switch ( i ) { case CONCENTRATE_CAP: - currentSwitchStatus = ( getFPGAConcentrateCapStatus() != 0 ? STATE_OPEN : STATE_CLOSED ); + currentSwitchStatus = getFPGAConcentrateCapStatus(); break; case DIALYSATE_CAP: - currentSwitchStatus = ( getFPGADialysateCapStatus() != 0 ? STATE_OPEN : STATE_CLOSED ); + currentSwitchStatus = getFPGADialysateCapStatus(); break; case FLUID_DOOR: - currentSwitchStatus = ( getFPGAGFluidDoorStatus() != 0 ? STATE_OPEN : STATE_CLOSED ); + currentSwitchStatus = getFPGAGFluidDoorStatus(); break; // NOTE: the default case was removed since this switch case is executed using a for loop so the default Index: firmware/App/DGCommon.h =================================================================== diff -u -r609d5c77e1f5bd85e9dd1a90b786e56004a79f06 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/DGCommon.h (.../DGCommon.h) (revision 609d5c77e1f5bd85e9dd1a90b786e56004a79f06) +++ firmware/App/DGCommon.h (.../DGCommon.h) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -25,7 +25,7 @@ #define DG_VERSION_MAJOR 0 #define DG_VERSION_MINOR 6 #define DG_VERSION_MICRO 0 -#define DG_VERSION_BUILD 18 +#define DG_VERSION_BUILD 117 // ********** build switches ********** Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r02654dc5b372b3af948ebd28aabb95cc4b51c785 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 02654dc5b372b3af948ebd28aabb95cc4b51c785) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -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 @@ handleTestFansRPMAlarmStartTimeOffsetOverrideRequest( message ); break; + case MSG_ID_DG_FANS_RPM_OVERRIDE: + handleFansRPMOverride( message ); + break; + case MSG_ID_DG_GET_SW_CONFIG_RECORD: handleGetDGSoftwareConfigRecord( message ); break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r02654dc5b372b3af948ebd28aabb95cc4b51c785 -r239f565516c73aae797288effcfdf1fca0a361a0 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 02654dc5b372b3af948ebd28aabb95cc4b51c785) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 239f565516c73aae797288effcfdf1fca0a361a0) @@ -22,7 +22,6 @@ #include "Accel.h" #include "ConcentratePumps.h" #include "ConductivitySensors.h" -#include "Fans.h" #include "FPGA.h" #include "Heaters.h" #include "ModeFlush.h" @@ -363,7 +362,6 @@ return result; } - // *********************************************************************** // **************** Message Handling Helper Functions ******************** // *********************************************************************** @@ -3047,37 +3045,6 @@ } /*********************************************************************//** - * @brief - * The handleFansRPMOverride function handles a request to override a fans RPM value. - * @details Inputs: none - * @details Outputs: message handled - * @param message a pointer to the message to handle - * @return none - *************************************************************************/ -void handleFansRPMOverride( MESSAGE_T *message ) -{ - TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; - BOOL result = FALSE; - - // verify payload length - if ( sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) == message->hdr.payloadLen ) - { - memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); - if ( FALSE == payload.reset ) - { - result = testSetFanRPMOverride( payload.index, payload.state.f32 ); - } - else - { - result = testResetFanRPMOverride( payload.index ); - } - } - - // respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); -} - -/*********************************************************************//** * @brief * The handleStopDGRTCClock function handles a request to stop the RTC clock. * @details Inputs: none @@ -3251,6 +3218,37 @@ /*********************************************************************//** * @brief + * The handleFansRPMOverride function handles a request to override a fans RPM value. + * @details Inputs: none + * @details Outputs: message handled + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleFansRPMOverride( MESSAGE_T *message ) +{ + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + BOOL result = FALSE; + + // verify payload length + if ( sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) == message->hdr.payloadLen ) + { + memcpy( &payload, message->payload, sizeof(TEST_OVERRIDE_ARRAY_PAYLOAD_T) ); + if ( FALSE == payload.reset ) + { + result = testSetFanRPMOverride( payload.index, payload.state.f32 ); + } + else + { + result = testResetFanRPMOverride( payload.index ); + } + } + + // respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); +} + +/*********************************************************************//** + * @brief * The handleTestFansRPMAlarmStartTimeOverrideRequest function handles a * request to override the fan RPM alarm start time. * @details Inputs: none