Index: firmware/App/Drivers/PinchValve.h =================================================================== diff -u -raa9f0fe5c470b1d77c58bade91337518cdd7bd7a -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Drivers/PinchValve.h (.../PinchValve.h) (revision aa9f0fe5c470b1d77c58bade91337518cdd7bd7a) +++ firmware/App/Drivers/PinchValve.h (.../PinchValve.h) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -67,7 +67,7 @@ U08 getPinchValveEnableReset( VALVE_T valve ); ///< Returns the last enable and reset value written for the selected valve. BOOL isPinchValveBusy( VALVE_T valve ); ///< Returns TRUE when the selected valve is executing or waiting for a command. -BOOL isPinchValveHomed( VALVE_T valve ); +BOOL isPinchValveHomed( VALVE_T valve ); ///< Returns TRUE when the selected valve is executing or waiting for a command S32 getPinchValveStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); ///< Returns the stored encoder position for the selected valve position. BOOL movePinchValveToStoredPosition( VALVE_T valve, VALVE_POSITION_T position ); ///< Starts movement to a previously stored valve position Index: firmware/App/Modes/ModePreTreat.c =================================================================== diff -u -r83310420ae862de4724f8cfbbaeda9936c47801b -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision 83310420ae862de4724f8cfbbaeda9936c47801b) +++ firmware/App/Modes/ModePreTreat.c (.../ModePreTreat.c) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -22,6 +22,7 @@ #include "DDInterface.h" #include "ModePreTreat.h" #include "OperationModes.h" +#include "PinchValve.h" #include "StatePreTxRecirculate.h" #include "SyringePump.h" #include "Timers.h" Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -rc0544e0ad0a0e83f247760f26205d79b64279ebe -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision c0544e0ad0a0e83f247760f26205d79b64279ebe) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -55,10 +55,6 @@ static TD_STANDBY_STATE_T handleStandbyModeStartState( void ); static TD_STANDBY_STATE_T handleStandbyModeWaitForTreatmentState( void ); -#if 1 -static BOOL startTest = FALSE; -static BOOL startPos = FALSE; -#endif /*********************************************************************//** * @brief @@ -74,8 +70,6 @@ homingInitiated = FALSE; fluidType = FLUID_TYPE_UNKNOWN; modality = TREATMENT_MODALITY_HD_SALINE_FLUID; - startTest = FALSE; // Temporary - startPos = FALSE; } /*********************************************************************//** @@ -122,9 +116,6 @@ // sendDGServiceRequestToDG(); // sendDGUsageInfoRequestToDG(); -#if 1 - initPinchValveDriver(); -#endif return currentStandbyState; } @@ -145,44 +136,7 @@ // Ignore stop button in this mode. } -#if 1 - if ( TRUE == startTest ) - { - startTest = FALSE; - startPos = TRUE; - homePinchValve( H1_VALV ); - homePinchValve( H19_VALV ); - } - if ( ( TRUE == isPinchValveHomed( H1_VALV ) ) - && ( TRUE == isPinchValveHomed( H19_VALV ) ) && startPos == TRUE ) - { - static U32 p = 1; - static U32 d = 0; - if ( ( TRUE != isPinchValveBusy( H1_VALV ) ) - && ( TRUE != isPinchValveBusy( H19_VALV ) ) ) - { - if ( ++d > 40 ) - { - d = 0; - setPinchValvePosition( H1_VALV, (VALVE_POSITION_T)p ); - setPinchValvePosition( H19_VALV, (VALVE_POSITION_T)p ); - p++; - if ( p >= NUM_OF_VALVE_POSITIONS ) - { - p = 1; - } - } - } - } -// if ( TRUE == startPos ) -// { -// startPos = FALSE; -// setPinchValvePosition( H1_VALV, VALVE_POSITION_B_OPEN ); -// setPinchValvePosition( H19_VALV, VALVE_POSITION_B_OPEN ); -// } -#endif - // State machine for standby mode switch ( currentStandbyState ) { Index: firmware/App/Modes/ModeStandby.h =================================================================== diff -u -r8345f0415ce34f2f47afcbf613a00216769f51c6 -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision 8345f0415ce34f2f47afcbf613a00216769f51c6) +++ firmware/App/Modes/ModeStandby.h (.../ModeStandby.h) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -35,8 +35,8 @@ /// Payload record structure for a treatment initiation request typedef struct { - U32 command; ///< Command code (Cancel=0, Initiate=1) - U32 modality; ///< Treatment modality selected by user (ignored on cancel) + U16 command; ///< Command code (Cancel=0, Initiate=1) + U16 modality; ///< Treatment modality selected by user (ignored on cancel) } INITIATE_TREATMENT_REQUEST_PAYLOAD_T; // ********** public function prototypes ********** Index: firmware/App/Services/AlarmMgmtTD.c =================================================================== diff -u -re0060cd79d971c0ed94b8aed6949d2754480fe92 -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Services/AlarmMgmtTD.c (.../AlarmMgmtTD.c) (revision e0060cd79d971c0ed94b8aed6949d2754480fe92) +++ firmware/App/Services/AlarmMgmtTD.c (.../AlarmMgmtTD.c) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -243,7 +243,7 @@ // If alarm is a fault (and not in service mode), request transition to fault mode if ( ( TRUE == props.alarmIsFault ) && ( getCurrentOperationMode() != MODE_SERV ) ) { - //requestNewOperationMode( MODE_FAUL ); + requestNewOperationMode( MODE_FAUL ); } // If alarm has stop property, signal stop now Index: firmware/App/Services/SystemCommTD.c =================================================================== diff -u -re0060cd79d971c0ed94b8aed6949d2754480fe92 -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/Services/SystemCommTD.c (.../SystemCommTD.c) (revision e0060cd79d971c0ed94b8aed6949d2754480fe92) +++ firmware/App/Services/SystemCommTD.c (.../SystemCommTD.c) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -267,7 +267,7 @@ // Only alarm on DG comm loss while in the treatment workflow if ( MODE_PRET == opMode || MODE_TREA == opMode || MODE_POST == opMode ) { - //activateAlarmNoData( ALARM_ID_TD_DD_COMM_TIMEOUT ); + activateAlarmNoData( ALARM_ID_TD_DD_COMM_TIMEOUT ); // we don't want to keep thinking DG is in a useful mode - set it to fault mode until DG is able to report its' true mode status // setDGOpMode( DG_MODE_FAUL, 0 ); } Index: firmware/App/TDCommon.h =================================================================== diff -u -re0060cd79d971c0ed94b8aed6949d2754480fe92 -rcff19e1c44fd570e139a2a3f49b5a05f0193367d --- firmware/App/TDCommon.h (.../TDCommon.h) (revision e0060cd79d971c0ed94b8aed6949d2754480fe92) +++ firmware/App/TDCommon.h (.../TDCommon.h) (revision cff19e1c44fd570e139a2a3f49b5a05f0193367d) @@ -34,10 +34,10 @@ // #define TASK_TIMING_OUTPUT_ENABLED 1 // Re-purposes alarm lamp pins for task timing // #define TEST_AIR_TRAP_ALPHA_TESTING 1 // Alpha unit air trap testing // #define TEST_PINCH_VALVES 1 // Alpha unit pinch valve testing - #define TEST_DEBUGGER 1 // Testing with debugger - prevents FPGA comm alarms caused by breakpoints +// #define TEST_DEBUGGER 1 // Testing with debugger - prevents FPGA comm alarms caused by breakpoints // #define TEST_PROCESS_TASKS_WO_UI 1 // Allow task processing even when UI not connected // #define TEST_UI_ONLY 1 // Alpha test with TD and UI only - no DD - #define TEST_DISABLE_UI_ALARMS 1 // Disable UI alarms +// #define TEST_DISABLE_UI_ALARMS 1 // Disable UI alarms // #define TEST_USE_OFF_AS_STOP_BUTTON 1 // Alpha test re-purposing off button as a stop button // #define TEST_NO_PRESSURE_CHECKS 1 // Alpha test with no pressure sensor checks // #define TEST_NO_STOP_CONSUME_CHECK 1 // Alpha test with no check for stop button timeout