Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rc06a32218bad65414ccda5d41293e5349e46d241 -r952a79dda24f4fb84937c8cc4e4dc9ef18c040f6 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision c06a32218bad65414ccda5d41293e5349e46d241) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 952a79dda24f4fb84937c8cc4e4dc9ef18c040f6) @@ -382,7 +382,7 @@ bloodPumpSetSpeedRPM = 0; isBloodPumpOn = FALSE; bpControlTimerCounter = 0; - setPeristalticPumpSetSpeed( bloodPumpSetSpeedRPM ); + setPeristalticPumpHardStop(); resetPIController( PI_CONTROLLER_ID_BLOOD_FLOW, 0.0F, 0.0F ); } @@ -1319,6 +1319,27 @@ /*********************************************************************//** * @brief + * The testHardStopBloodPump function hard stops the blood pump. + * @details \b Inputs: none + * @details \b Outputs: none + * @param message BP home command message from Dialin. + * @return TRUE if command successful, FALSE if not + *************************************************************************/ +BOOL testHardStopBloodPump( MESSAGE_T *message ) +{ + BOOL result = FALSE; + + if ( 0 == message->hdr.payloadLen ) + { + result = TRUE; + signalBloodPumpHardStop(); + } + + return result; +} + +/*********************************************************************//** + * @brief * The testBPFlowAlphaYInterceptOverride function overrides the Alpha Y * intercept of the blood flow estimation equation. * @details \b Inputs: none Index: firmware/App/Modes/OperationModes.c =================================================================== diff -u -rc06a32218bad65414ccda5d41293e5349e46d241 -r952a79dda24f4fb84937c8cc4e4dc9ef18c040f6 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision c06a32218bad65414ccda5d41293e5349e46d241) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 952a79dda24f4fb84937c8cc4e4dc9ef18c040f6) @@ -23,7 +23,7 @@ #include "ModeFault.h" #include "ModeStandby.h" #include "ModeTxParams.h" -//#include "ModePreTreat.h" +#include "ModePreTreat.h" #include "ModeTreatment.h" //#include "ModePostTreat.h" //#include "NVDataMgmt.h" @@ -207,10 +207,10 @@ currentSubMode = execTreatParamsMode(); break; -// case MODE_PRET: -// currentSubMode = execPreTreatmentMode(); -// break; -// + case MODE_PRET: + currentSubMode = execPreTreatmentMode(); + break; + case MODE_TREA: currentSubMode = execTreatmentMode(); break; @@ -413,9 +413,9 @@ case MODE_TPAR: currentSubMode = transitionToTreatParamsMode(); break; -// case MODE_PRET: -// currentSubMode = transitionToPreTreatmentMode(); -// break; + case MODE_PRET: + currentSubMode = transitionToPreTreatmentMode(); + break; case MODE_TREA: currentSubMode = transitionToTreatmentMode(); break; Index: firmware/App/Services/Messaging.c =================================================================== diff -u -rc06a32218bad65414ccda5d41293e5349e46d241 -r952a79dda24f4fb84937c8cc4e4dc9ef18c040f6 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision c06a32218bad65414ccda5d41293e5349e46d241) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 952a79dda24f4fb84937c8cc4e4dc9ef18c040f6) @@ -167,7 +167,8 @@ { MSG_ID_TD_BLOOD_FLOW_WEAR_B_TERM_OVERRIDE_REQUEST, &testBPFlowWearBTermOverride }, { MSG_ID_TD_SET_TEST_CONFIGURATION, &testSetTestConfiguration }, { MSG_ID_TD_GET_TEST_CONFIGURATION, &testGetTestConfiguration }, - { MSG_ID_TD_RESET_ALL_TEST_CONFIGURATIONS, &testResetAllTestConfigurations } + { MSG_ID_TD_RESET_ALL_TEST_CONFIGURATIONS, &testResetAllTestConfigurations }, + { MSG_ID_TD_HARD_STOP_BLOOD_PUMP, &testHardStopBloodPump } }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLER_LOOKUP) / sizeof(MSG_HANDLER_LOOKUP_T)) Index: firmware/App/TDCommon.h =================================================================== diff -u -rc91197feca4975a1709b9f5b0a2efd58d204cb2c -r952a79dda24f4fb84937c8cc4e4dc9ef18c040f6 --- firmware/App/TDCommon.h (.../TDCommon.h) (revision c91197feca4975a1709b9f5b0a2efd58d204cb2c) +++ firmware/App/TDCommon.h (.../TDCommon.h) (revision 952a79dda24f4fb84937c8cc4e4dc9ef18c040f6) @@ -36,11 +36,12 @@ // #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_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_UI_ONLY 1 // Alpha test with TD and UI only - no DD // #define TEST_NO_PINCH_VALVES 1 // Alpha test with no pinch valve functionality // #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_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 +// #define ASN_DEMO 1 #include #include