Index: firmware/App/Drivers/BubbleDetector.c =================================================================== diff -u -rabba5986eed8c2f702ca1ed70afd735a7f31db2a -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision abba5986eed8c2f702ca1ed70afd735a7f31db2a) +++ firmware/App/Drivers/BubbleDetector.c (.../BubbleDetector.c) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -107,8 +107,8 @@ * @brief * The testBubbleDetectOverride function overrides the bubble detect state * for a given bubble detector. - * @details \b Inputs: msTimerCount - * @details \b Outputs: alarmStartedAt[] + * @details \b Inputs: none + * @details \b Outputs: currentBubbleState[] * @param message Override message from Dialin which includes an ID of * the sensor to override and the state to override the sensor to. * @return TRUE if override request is successful, FALSE if not Index: firmware/App/Drivers/PressureSensor.c =================================================================== diff -u -rabba5986eed8c2f702ca1ed70afd735a7f31db2a -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision abba5986eed8c2f702ca1ed70afd735a7f31db2a) +++ firmware/App/Drivers/PressureSensor.c (.../PressureSensor.c) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -254,5 +254,55 @@ return result; } + + +/************************************************************************* + * TEST SUPPORT FUNCTIONS + *************************************************************************/ + + +/*********************************************************************//** + * @brief + * The testPressureSensorOverride function overrides the pressure reading + * for a given pressure sensor. + * @details \b Inputs: none + * @details \b Outputs: currentPressureReadings[] + * @param message Override message from Dialin which includes an ID of + * the sensor to override and the state to override the sensor to. + * @return TRUE if override request is successful, FALSE if not + *************************************************************************/ +BOOL testPressureSensorOverride( MESSAGE_T *message ) +{ + BOOL result = FALSE; + TEST_OVERRIDE_ARRAY_PAYLOAD_T override; + OVERRIDE_TYPE_T ovType = getOverrideArrayPayloadFromMessage( message, &override ); + + // Verify tester has logged in with TD and override type is valid + if ( ( TRUE == isTestingActivated() ) && ( ovType != OVERRIDE_INVALID ) && ( ovType < NUM_OF_OVERRIDE_TYPES ) ) + { + U32 sensor = override.index; + + // Verify pressure sensor index of override + if ( sensor < NUM_OF_PRESSURE_SENSORS ) + { + result = TRUE; + + if ( OVERRIDE_OVERRIDE == ovType ) + { + F32 value = override.state.f32; + + currentPressureReadings[ sensor ].ovData = value; + currentPressureReadings[ sensor ].override = OVERRIDE_KEY; + } + else + { + currentPressureReadings[ sensor ].override = OVERRIDE_RESET; + currentPressureReadings[ sensor ].ovData = currentPressureReadings[ sensor ].ovInitData; + } + } + } + + return result; +} /**@}*/ Index: firmware/App/Drivers/PressureSensor.h =================================================================== diff -u -r380b0afc95467d0861ff3aa2cdcde5d5d7ac85e7 -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Drivers/PressureSensor.h (.../PressureSensor.h) (revision 380b0afc95467d0861ff3aa2cdcde5d5d7ac85e7) +++ firmware/App/Drivers/PressureSensor.h (.../PressureSensor.h) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -48,6 +48,8 @@ U32 getPressureSensorReadCount( PRESSURE_SENSORS_T sensor ); U32 getPressureSensorErrorCount( PRESSURE_SENSORS_T sensor ); +BOOL testPressureSensorOverride( MESSAGE_T *message ); + /**@}*/ #endif Index: firmware/App/Monitors/Bubbles.c =================================================================== diff -u -r494b19c85bdea2b8fc273c648b4f1955f9d07dc3 -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 494b19c85bdea2b8fc273c648b4f1955f9d07dc3) +++ firmware/App/Monitors/Bubbles.c (.../Bubbles.c) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -20,7 +20,6 @@ #include "FpgaTD.h" #include "Messaging.h" #include "OperationModes.h" -#include "TaskGeneral.h" #include "TaskPriority.h" #include "Timers.h" @@ -64,7 +63,7 @@ /*********************************************************************//** * @brief - * The initBubbles function initializes the air bubble detectors module. + * The initBubbles function initializes the air bubble monitor unit. * @details \b Inputs: none * @details \b Outputs: Air bubble monitor unit initialized. * @return none @@ -92,8 +91,9 @@ /*********************************************************************//** * @brief * The execBubbles function executes the air bubble monitor state machine. - * @details \b Inputs: bubblesState - * @details \b Outputs: bubblesState + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if invalid bubble monitor state. + * @details \b Inputs: bubblesState[] + * @details \b Outputs: bubblesState[] * @return none *************************************************************************/ void execBubbles( void ) @@ -192,7 +192,7 @@ * @brief * The handleBubbleNormalState function handles a given air bubble module * in normal state. - * @details \b Alarm: ALARM_ID_HD_VENOUS_BUBBLE_DETECTED if venous bubble detected. + * @details \b Alarm: ALARM_ID_TD_VENOUS_BUBBLE_DETECTED if venous bubble detected. * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given bubble sensor is invalid. * @details \b Inputs: none * @details \b Outputs: bubblesSelfTestStatus @@ -202,7 +202,6 @@ static BUBBLE_STATES_T handleBubbleNormalState( BUBBLE_DETECTOR_T bubble ) { BUBBLE_STATES_T state = BUBBLE_NORMAL_STATE; -// TREATMENT_STATE_T treatmentState = getTreatmentState(); if ( bubble < NUM_OF_BUBBLE_DETECTORS ) { @@ -215,7 +214,7 @@ if ( ( BUBBLE_DETECTED == getBubbleDetectedState( bubble ) ) && ( bubbleDetectionEnabled[ bubble ] != FALSE ) ) { -// activateAlarmNoData( ALARM_ID_HD_VENOUS_BUBBLE_DETECTED ); + activateAlarmNoData( ALARM_ID_TD_VENOUS_BUBBLE_DETECTED ); } } @@ -341,7 +340,7 @@ if ( OVERRIDE_OVERRIDE == ovType ) { U32 value = override.state.u32; - U32 intvl = value / TASK_GENERAL_INTERVAL; + U32 intvl = value / TASK_PRIORITY_INTERVAL; if ( intvl > 0 ) { Index: firmware/App/Monitors/Voltages.c =================================================================== diff -u -r2f00c73cb1a67b9206c64a29a4d45d21b0f129f2 -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Monitors/Voltages.c (.../Voltages.c) (revision 2f00c73cb1a67b9206c64a29a4d45d21b0f129f2) +++ firmware/App/Monitors/Voltages.c (.../Voltages.c) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -267,8 +267,8 @@ { clearAlarmCondition( ALARM_ID_TD_AC_POWER_LOST ); - // Just to make sure we are not clearing the AC power lost in treatment alarm until DG powers up and not in - // POST mode, to avoid HD sending commands when DG is not yet ready. + // Just to make sure we are not clearing the AC power lost in treatment alarm until DD powers up and not in + // POST mode, to avoid TD sending commands when DD is not yet ready. if ( DD_MODE_INIT != getDDOpMode() ) { clearAlarmCondition( ALARM_ID_TD_AC_POWER_LOST_IN_TREATMENT ); Index: firmware/App/Services/AlarmMgmtSWFaults.h =================================================================== diff -u -r494b19c85bdea2b8fc273c648b4f1955f9d07dc3 -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 494b19c85bdea2b8fc273c648b4f1955f9d07dc3) +++ firmware/App/Services/AlarmMgmtSWFaults.h (.../AlarmMgmtSWFaults.h) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -113,7 +113,7 @@ SW_FAULT_ID_VOLTAGES_INVALID_SIGNAL = 82, SW_FAULT_ID_BUBBLES_INVALID_STATE = 83, SW_FAULT_ID_BUBBLES_INVALID_SENSOR_ID1 = 84, - SW_FAULT_ID_BUBBLES_INVALID_SENSOR_ID2 = 84, + SW_FAULT_ID_BUBBLES_INVALID_SENSOR_ID2 = 85, NUM_OF_SW_FAULT_IDS } SW_FAULT_ID_T; Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r494b19c85bdea2b8fc273c648b4f1955f9d07dc3 -r0c8ae7b952186d912c77d8c2cfb7dad809fa5225 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 494b19c85bdea2b8fc273c648b4f1955f9d07dc3) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 0c8ae7b952186d912c77d8c2cfb7dad809fa5225) @@ -22,6 +22,7 @@ #include "Messaging.h" #include "OperationModes.h" #include "PAL.h" +#include "PressureSensor.h" #include "SystemCommTD.h" #include "Utilities.h" #include "Voltages.h" @@ -71,10 +72,11 @@ static const U16 MSG_FUNCTION_HANDLER_LOOKUP[] = { MSG_ID_TESTER_LOGIN_REQUEST, MSG_ID_TD_SOFTWARE_RESET_REQUEST, - MSG_ID_TD_VENOUS_BUBBLE_OVERRIDE_REQUEST, + MSG_ID_TD_BUBBLE_OVERRIDE_REQUEST, MSG_ID_TD_VOLTAGE_PUBLISH_INTERVAL_OVERRIDE_REQUEST, MSG_ID_TD_VOLTAGE_OVERRIDE_REQUEST, - MSG_ID_TD_BUBBLE_PUBLISH_INTERVAL_OVERRIDE_REQUEST + MSG_ID_TD_BUBBLE_PUBLISH_INTERVAL_OVERRIDE_REQUEST, + MSG_ID_TD_PRESSURE_OVERRIDE_REQUEST }; /// Message handling function table @@ -84,7 +86,8 @@ &testBubbleDetectOverride, &testVoltageDataPublishIntervalOverride, &testVoltageOverride, - &testBubblesDataPublishIntervalOverride + &testBubblesDataPublishIntervalOverride, + &testPressureSensorOverride }; #define NUM_OF_FUNCTION_HANDLERS (sizeof(MSG_FUNCTION_HANDLERS) / sizeof(MsgFuncPtr)) @@ -296,6 +299,7 @@ break; } } + return func; } @@ -342,13 +346,8 @@ } -// *********************************************************************** -// ***************** Message Handling Helper Functions ******************** -// *********************************************************************** - - // *********************************************************************** // ***************** Message Sending Helper Functions ******************** // ***********************************************************************