Index: firmware/App/Controllers/LoadCell.c =================================================================== diff -u -rf2d00ceb224ce5f7a239379fff23ee63d919cfb7 -rb135150a91ea70889433dd23420fdbe91745fc91 --- firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision f2d00ceb224ce5f7a239379fff23ee63d919cfb7) +++ firmware/App/Controllers/LoadCell.c (.../LoadCell.c) (revision b135150a91ea70889433dd23420fdbe91745fc91) @@ -98,12 +98,105 @@ * The testSetLoadCellA1Override function overrides the measured \n * load cell A1. \n * The testResetLoadCellA1Override function resets the override of the \n - * load cell A1. + * load cell A1. \n * @details * Inputs : none - * Outputs : raw adc value for load cell A1 - * @param value : override measured blood pump current (in mA) + * Outputs : loadCellA1raw + * @param value : override measured load cell A1 raw * @return TRUE if override successful, FALSE if not *************************************************************************/ -DATA_OVERRIDE_FUNC( F32, testSetMeasuredBloodPumpMCCurrentOverride, testResetMeasuredBloodPumpMCCurrentOverride, adcBloodPumpMCCurrentmA ) +DATA_OVERRIDE_FUNC( U32, testSetLoadCellA1Override, testResetLoadCellA1Override, loadCellA1raw ) +/************************************************************************* + * @brief testSetLoadCellA2Override and testResetLoadCellA2Override + * The testSetLoadCellA2Override function overrides the measured \n + * load cell A2. \n + * The testResetLoadCellA1Override function resets the override of the \n + * load cell A2. \n + * @details + * Inputs : none + * Outputs : loadCellA2raw + * @param value : override measured load cell A2 raw + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +DATA_OVERRIDE_FUNC( U32, testSetLoadCellA2Override, testResetLoadCellA2Override, loadCellA2raw ) + +/************************************************************************* + * @brief testSetLoadCellB1Override and testResetLoadCellB1Override + * The testSetLoadCellB1Override function overrides the measured \n + * load cell B1. \n + * The testResetLoadCellB1Override function resets the override of the \n + * load cell B1. \n + * @details + * Inputs : none + * Outputs : loadCellB1raw + * @param value : override measured load cell B1 raw + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +DATA_OVERRIDE_FUNC( U32, testSetLoadCellB1Override, testResetLoadCellB1Override, loadCellB1raw ) + +/************************************************************************* + * @brief testSetLoadCellB2Override and testResetLoadCellB2Override + * The testSetLoadCellB2Override function overrides the measured \n + * load cell B2. \n + * The testResetLoadCellB2Override function resets the override of the \n + * load cell B2. \n + * @details + * Inputs : none + * Outputs : loadCellB2raw + * @param value : override measured load cell B2 raw + * @return TRUE if override successful, FALSE if not + *************************************************************************/ +DATA_OVERRIDE_FUNC( U32, testSetLoadCellB2Override, testResetLoadCellB2Override, loadCellB2raw ) + +/************************************************************************* + * @brief getLoadCellA1raw + * The getLoadCellA1raw function gets the measured load cell A1 \n + * current. + * @details + * Inputs : loadCellA1raw + * Outputs : none + * @param none + * @return the load cell A1 raw value. + *************************************************************************/ +DATA_GET( U32, getLoadCellA1raw, loadCellA1raw ) + + +/************************************************************************* + * @brief getLoadCellA2raw + * The getLoadCellA2raw function gets the measured load cell A2 \n + * current. + * @details + * Inputs : loadCellA2raw + * Outputs : none + * @param none + * @return the load cell A2 raw value. + *************************************************************************/ +DATA_GET( U32, getLoadCellA2raw, loadCellA2raw ) + +/************************************************************************* + * @brief getLoadCellB1raw + * The getLoadCellB1raw function gets the measured load cell B1 \n + * current. + * @details + * Inputs : loadCellB1raw + * Outputs : none + * @param none + * @return the load cell B1 raw value. + *************************************************************************/ +DATA_GET( U32, getLoadCellB1raw, loadCellB1raw ) + +/************************************************************************* + * @brief getLoadCellB2raw + * The getLoadCellB2raw function gets the measured load cell B2 \n + * current. + * @details + * Inputs : loadCellB2raw + * Outputs : none + * @param none + * @return the load cell B2 raw value. + *************************************************************************/ +DATA_GET( U32, getLoadCellB2raw, loadCellB2raw ) + + + Index: firmware/App/Services/SystemComm.c =================================================================== diff -u -r4d1572f8226f06febef4a536cdd0946d0dd0fb02 -rb135150a91ea70889433dd23420fdbe91745fc91 --- firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision 4d1572f8226f06febef4a536cdd0946d0dd0fb02) +++ firmware/App/Services/SystemComm.c (.../SystemComm.c) (revision b135150a91ea70889433dd23420fdbe91745fc91) @@ -1058,6 +1058,22 @@ handleSetRTCTimestamp( message ); break; + case MSG_ID_LOAD_CELL_A1_OVERRIDE: + handleTestLoadCellA1OverrideRequest( message ); + break; + + case MSG_ID_LOAD_CELL_A2_OVERRIDE: + handleTestLoadCellA2OverrideRequest( message ); + break; + + case MSG_ID_LOAD_CELL_B1_OVERRIDE: + handleTestLoadCellB1OverrideRequest( message ); + break; + + case MSG_ID_LOAD_CELL_B2_OVERRIDE: + handleTestLoadCellB2OverrideRequest( message ); + break; + default: // TODO - unrecognized message ID received - ignore break; Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rb64c49fdcf2b6d95e61e63f8e258c4e600935bbd -rb135150a91ea70889433dd23420fdbe91745fc91 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision b64c49fdcf2b6d95e61e63f8e258c4e600935bbd) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision b135150a91ea70889433dd23420fdbe91745fc91) @@ -526,6 +526,54 @@ DATA_ARRAY_OVERRIDE_HANDLER_FUNC_U32( BOOL, handleTestAlarmStateOverrideRequest, testSetAlarmStateOverride, testResetAlarmStateOverride ) /************************************************************************* + * @brief handleTestLoadCellA1OverrideRequest + * The handleTestLoadCellA1OverrideRequest function handles a request to \n + * override the value read from load cell A1 adc. + * @details + * Inputs : none + * Outputs : message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +DATA_OVERRIDE_HANDLER_FUNC_U32( BOOL, handleTestLoadCellA1OverrideRequest, testSetLoadCellA1Override, testResetLoadCellA1Override ) + +/************************************************************************* + * @brief handleTestLoadCellA2OverrideRequest + * The handleTestLoadCellA2OverrideRequest function handles a request to \n + * override the value read from load cell A1 adc. + * @details + * Inputs : none + * Outputs : message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +DATA_OVERRIDE_HANDLER_FUNC_U32( BOOL, handleTestLoadCellA2OverrideRequest, testSetLoadCellA2Override, testResetLoadCellA2Override ) + +/************************************************************************* + * @brief handleTestLoadCellB1OverrideRequest + * The handleTestLoadCellB1OverrideRequest function handles a request to \n + * override the value read from load cell A1 adc. + * @details + * Inputs : none + * Outputs : message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +DATA_OVERRIDE_HANDLER_FUNC_U32( BOOL, handleTestLoadCellB1OverrideRequest, testSetLoadCellB1Override, testResetLoadCellB1Override ) + +/************************************************************************* + * @brief handleTestLoadCellB2OverrideRequest + * The handleTestLoadCellB2OverrideRequest function handles a request to \n + * override the value read from load cell A1 adc. + * @details + * Inputs : none + * Outputs : message handled + * @param message : a pointer to the message to handle + * @return none + *************************************************************************/ +DATA_OVERRIDE_HANDLER_FUNC_U32( BOOL, handleTestLoadCellB2OverrideRequest, testSetLoadCellB2Override, testResetLoadCellB2Override ) + +/************************************************************************* * @brief handleSetRTCTimestamp * The handleSetRTCTimestamp function handles a request to write time and * date to RTC Index: firmware/App/Services/SystemCommMessages.h =================================================================== diff -u -rb64c49fdcf2b6d95e61e63f8e258c4e600935bbd -rb135150a91ea70889433dd23420fdbe91745fc91 --- firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision b64c49fdcf2b6d95e61e63f8e258c4e600935bbd) +++ firmware/App/Services/SystemCommMessages.h (.../SystemCommMessages.h) (revision b135150a91ea70889433dd23420fdbe91745fc91) @@ -53,6 +53,10 @@ MSG_ID_WATCHDOG_TASK_CHECKIN_OVERRIDE, // 0xA002 MSG_ID_ALARM_STATE_OVERRIDE, // 0xA003 MSG_ID_SET_RTC_DATE_TIME, // 0xA004 + MSG_ID_LOAD_CELL_A1_OVERRIDE, // 0xA005 + MSG_ID_LOAD_CELL_A2_OVERRIDE, // 0xA006 + MSG_ID_LOAD_CELL_B1_OVERRIDE, // 0xA007 + MSG_ID_LOAD_CELL_B2_OVERRIDE, // 0xA008 END_OF_MSG_IDS } MSG_ID_T; @@ -97,6 +101,18 @@ // MSG_ID_ALARM_STATE_OVERRIDE void handleTestAlarmStateOverrideRequest( MESSAGE_T *message ); +// MSG_ID_LOAD_CELL_A1_OVERRIDE +void handleTestLoadCellA1OverrideRequest( MESSAGE_T *message ); + +// MSG_ID_LOAD_CELL_A2_OVERRIDE +void handleTestLoadCellA2OverrideRequest( MESSAGE_T *message ); + +// MSG_ID_LOAD_CELL_B1_OVERRIDE +void handleTestLoadCellB1OverrideRequest( MESSAGE_T *message ); + +// MSG_ID_LOAD_CELL_B2_OVERRIDE +void handleTestLoadCellB2OverrideRequest( MESSAGE_T *message ); + // MSG_ID_SET_RTC_TIMESTAMP void handleSetRTCTimestamp( MESSAGE_T *message );