Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -rc38c6d64b5f4df1fe08e2daabb37d3a7a483a4be -r202e8887cc525b19b76b4eba309afed2e394f49b --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision c38c6d64b5f4df1fe08e2daabb37d3a7a483a4be) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 202e8887cc525b19b76b4eba309afed2e394f49b) @@ -55,6 +55,7 @@ #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 ( 1 * MS_PER_SECOND / 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. Index: firmware/App/Controllers/TemperatureSensors.c =================================================================== diff -u -rc38c6d64b5f4df1fe08e2daabb37d3a7a483a4be -r202e8887cc525b19b76b4eba309afed2e394f49b --- firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision c38c6d64b5f4df1fe08e2daabb37d3a7a483a4be) +++ firmware/App/Controllers/TemperatureSensors.c (.../TemperatureSensors.c) (revision 202e8887cc525b19b76b4eba309afed2e394f49b) @@ -301,9 +301,6 @@ // Persistent alarm for the temperature sensors range check initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_OUT_OF_RANGE, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); - // Persistent alarm for the temperature sensors range check - initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_ADC_FAULT, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS, TEMP_SENSORS_OUT_OF_RANGE_TIME_OUT_MS ); - // Persistent alarm for the temperature sensors error bit fault check initPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSOR_ERROR_BIT_FAULT, TEMP_SENSORS_ERROR_BIT_TIMEOUT_MS, TEMP_SENSORS_ERROR_BIT_TIMEOUT_MS ); @@ -696,11 +693,6 @@ tempSensors[ sensorIndex ].fpgaErrorStatus = ( ( FALSE == isFPGACountChanging ) || ( FALSE == isFPGAErrorZero ) ? TRUE : FALSE ); - for ( i = 0; i < NUM_OF_TEMPERATURE_SENSORS; i++ ) - { - // Loop through all the sensors and read their FPGA error status - isTemperatureNotValid |= tempSensors[ sensorIndex ].fpgaErrorStatus; - } #ifndef DISABLE_FPGA_ALARMS_UNTIL_THE_NEW_PERSISTENT checkPersistentAlarm( ALARM_ID_DG_TEMPERATURE_SENSORS_FPGA_FAULT, isTemperatureNotValid, sensorIndex, TEMP_SENSORS_FPGA_ERROR_TIMEOUT_MS ); Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -r9cf99616cedc2bdf73b1af4dbbb43ee1cf3ef06b -r202e8887cc525b19b76b4eba309afed2e394f49b --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 9cf99616cedc2bdf73b1af4dbbb43ee1cf3ef06b) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 202e8887cc525b19b76b4eba309afed2e394f49b) @@ -131,7 +131,6 @@ void execOperationModes( void ) { DG_OP_MODE_T newMode; - U32 priorSubMode = currentSubMode; priorSubMode = currentSubMode; @@ -150,7 +149,6 @@ if ( currentMode != newMode ) { // handle transition to new mode - priorSubMode = 0; lastMode = currentMode; transitionToNewOperationMode( newMode ); currentMode = newMode; @@ -420,6 +418,34 @@ /*********************************************************************//** * @brief + * The testSetOperationMode function will transition to a given operation + * mode if the transition is legal. + * @details Inputs: none + * @details Outputs: modeRequest[] + * @param newMode ID of requested mode to transition to + * @return TRUE if request successful, FALSE if not + *************************************************************************/ +BOOL testSetOperationMode( DG_OP_MODE_T newMode ) +{ + BOOL result = FALSE; + + if ( TRUE == isTestingActivated() ) + { + DG_OP_MODE_T check = MODE_TRANSITION_TABLE[ currentMode ][ newMode ]; + + // Is mode transition legal? + if ( check == newMode ) + { + requestNewOperationMode( newMode ); + result = TRUE; + } + } + + return result; +} + +/*********************************************************************//** + * @brief * The testSetDGOpModePublishIntervalOverride function overrides the * DG operation mode publish interval. * @details Inputs: none Index: firmware/App/Services/FPGA.c =================================================================== diff -u -rc38c6d64b5f4df1fe08e2daabb37d3a7a483a4be -r202e8887cc525b19b76b4eba309afed2e394f49b --- firmware/App/Services/FPGA.c (.../FPGA.c) (revision c38c6d64b5f4df1fe08e2daabb37d3a7a483a4be) +++ firmware/App/Services/FPGA.c (.../FPGA.c) (revision 202e8887cc525b19b76b4eba309afed2e394f49b) @@ -84,7 +84,7 @@ #define FPGA_FLUIDLEAK_STATE_MASK 0x0004 ///< Bit mask for fluid leak detector. #define CONCENTRATE_CAP_SWITCH_MASK 0x10 ///< Concentrate cap switch bit mask -#define DIALYSATE_CAP_SWITCH_MASK 0x20 ///< Dialysate cap switch bit mask.. +#define DIALYSATE_CAP_SWITCH_MASK 0x20 ///< Dialysate cap switch bit mask. #define FPGA_POWER_OUT_TIMEOUT_MS ( 2 * MS_PER_SECOND ) ///< FPGA power out timeout in milliseconds. #define FPGA_GPIO_POWER_STATUS_PIN 7 ///< FPGA GPIO power status pin. #define FPGA_READ_V3_START_BYTE_NUM 256 ///< FPGA V3 read sensors start byte number.