Index: firmware/App/Controllers/AirTrap.c =================================================================== diff -u -r79a1bc916aaa25b696385e9b292bf6262bab6113 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 79a1bc916aaa25b696385e9b292bf6262bab6113) +++ firmware/App/Controllers/AirTrap.c (.../AirTrap.c) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -440,7 +440,7 @@ // Air pump stop time based on the blood flow rate S32 qB = 500; // TODO abs( getTargetBloodFlowRate() ); U32 qBx = ( 0 == qB ? MIN_SET_BLOOD_FLOW_RATE : (U32)qB ); - U32 airPumpStopTime = AIR_PUMP_LOWER_OP_TIME_MIN_MS + ( ( qBx - MIN_SET_BLOOD_FLOW_RATE ) / 2 ); + U32 airPumpStopTime = 10000; //AIR_PUMP_LOWER_OP_TIME_MIN_MS + ( ( qBx - MIN_SET_BLOOD_FLOW_RATE ) / 2 ); // Transition to manual valve control state when requested if ( TRUE == pendingStopAirTrapController ) @@ -523,6 +523,7 @@ data.h13State = get3WayValveState( H13_VALV ); data.h20State = get3WayValveState( H20_VALV ); data.isAutoControlling = isAirTrapControlling(); + data.airTrapState = airTrapControllerState; broadcastData( MSG_ID_TD_AIR_TRAP_DATA, COMM_BUFFER_OUT_CAN_TD_BROADCAST, (U08*)&data, sizeof( AIR_TRAP_PAYLOAD_T ) ); airTrapDataPublicationTimerCounter = 0; Index: firmware/App/Controllers/AirTrap.h =================================================================== diff -u -reaff654b897f641b874e3ba30a22cbda3779e4a7 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision eaff654b897f641b874e3ba30a22cbda3779e4a7) +++ firmware/App/Controllers/AirTrap.h (.../AirTrap.h) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -62,6 +62,8 @@ BOOL testAirTrapDataPublishIntervalOverride( MESSAGE_T *message ); BOOL testSetAirTrapControl( MESSAGE_T *message ); +BOOL testAirPumpPowerRaiseOverride( MESSAGE_T *message ); +BOOL testAirPumpPowerLowerOverride( MESSAGE_T *message ); /**@}*/ Index: firmware/App/Controllers/BloodFlow.c =================================================================== diff -u -rc06a32218bad65414ccda5d41293e5349e46d241 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision c06a32218bad65414ccda5d41293e5349e46d241) +++ firmware/App/Controllers/BloodFlow.c (.../BloodFlow.c) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -383,6 +383,7 @@ isBloodPumpOn = FALSE; bpControlTimerCounter = 0; setPeristalticPumpSetSpeed( bloodPumpSetSpeedRPM ); + setPeristalticPumpHardStop(); resetPIController( PI_CONTROLLER_ID_BLOOD_FLOW, 0.0F, 0.0F ); } @@ -1319,6 +1320,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 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision c06a32218bad65414ccda5d41293e5349e46d241) +++ firmware/App/Modes/OperationModes.c (.../OperationModes.c) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -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 -r88ca7ce615a26d2ef7ece2ee25abcd05fc0108e5 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 88ca7ce615a26d2ef7ece2ee25abcd05fc0108e5) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -170,6 +170,7 @@ { MSG_ID_TD_RESET_ALL_TEST_CONFIGURATIONS, &testResetAllTestConfigurations }, { MSG_ID_TD_AIR_PUMP_POWER_RAISE_OVERRIDE_REQUEST, &testAirPumpPowerRaiseOverride }, { MSG_ID_TD_AIR_PUMP_POWER_LOWER_OVERRIDE_REQUEST, &testAirPumpPowerLowerOverride }, + { 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 -reaff654b897f641b874e3ba30a22cbda3779e4a7 -r18981bf79f6c19a1822f003084e80547c21cdb62 --- firmware/App/TDCommon.h (.../TDCommon.h) (revision eaff654b897f641b874e3ba30a22cbda3779e4a7) +++ firmware/App/TDCommon.h (.../TDCommon.h) (revision 18981bf79f6c19a1822f003084e80547c21cdb62) @@ -25,7 +25,7 @@ #define TD_VERSION_MAJOR 0 #define TD_VERSION_MINOR 0 #define TD_VERSION_MICRO 0 -#define TD_VERSION_BUILD 12 +#define TD_VERSION_BUILD 16 // ********** development build switches **********