Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r83156b9098cc97a7402db4efba5320fac8284ce4 -rc1e2dfcd544f59788ad1a58e1e8339a475ba4266 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 83156b9098cc97a7402db4efba5320fac8284ce4) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c1e2dfcd544f59788ad1a58e1e8339a475ba4266) @@ -8,7 +8,7 @@ * @file SystemCommMessages.c * * @author (last) Sean Nash -* @date (last) 13-Apr-2023 +* @date (last) 04-May-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -4820,7 +4820,7 @@ U32 valve; memcpy( &valve, message->payload, sizeof(U32) ); - homeValve( (VALVE_T)valve ); + homeValve( (VALVE_T)valve, VALVE_FORCE_HOME, VALVE_NO_CARTRIDGE_PRESENT ); result = TRUE; } @@ -8027,6 +8027,7 @@ // Verify payload length if ( ( 0 == message->hdr.payloadLen ) && ( TRUE == isTestingActivated() ) ) { + result = TRUE; signalDialInPumpHardStop(); } @@ -8050,6 +8051,7 @@ // Verify payload length if ( ( 0 == message->hdr.payloadLen ) && ( TRUE == isTestingActivated() ) ) { + result = TRUE; signalDialOutPumpHardStop(); } @@ -8073,6 +8075,7 @@ // Verify payload length if ( ( 0 == message->hdr.payloadLen ) && ( TRUE == isTestingActivated() ) ) { + result = TRUE; signalBloodPumpHardStop(); } @@ -8082,35 +8085,29 @@ /*********************************************************************//** * @brief - * The handleTestHDSetTestConfig function handles a request to set the - * test configuration. + * The handleEnableVenousBubbleAlarmDetectionRequest function handles a + * request to enable/disable venous bubble alarm detection. * @details Inputs: none * @details Outputs: message handled - * @param message a pointer to the message to handle + * @param message : a pointer to the message to handle * @return none *************************************************************************/ -void handleTestHDSetTestConfig( MESSAGE_T *message ) +void handleEnableVenousBubbleAlarmDetectionRequest( MESSAGE_T *message ) { - BOOL status = FALSE; + BOOL result = FALSE; - if ( message->hdr.payloadLen == sizeof( TEST_CONFIG_PAYLOAD_T ) ) + // Verify payload length + if ( sizeof( BOOL ) == message->hdr.payloadLen ) { - TEST_CONFIG_PAYLOAD_T payload; + BOOL enabled; - memcpy( &payload, message->payload, sizeof( TEST_CONFIG_PAYLOAD_T ) ); - - if ( TRUE == payload.reset ) - { - status = resetTestConfig( (TEST_CONFIG_T)payload.config ); - } - else - { - status = setTestConfig( (TEST_CONFIG_T)payload.config ); - } + memcpy( &enabled, message->payload, sizeof( BOOL ) ); + result = TRUE; + setVenousBubbleDetectionEnabled( enabled ); } // Respond to request - sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, result ); } /*********************************************************************//** @@ -8181,4 +8178,37 @@ sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); } +/*********************************************************************//** +* @brief +* The handleTestHDSetTestConfig function handles a request to set the +* test configuration. +* @details Inputs: none +* @details Outputs: message handled +* @param message a pointer to the message to handle +* @return none +*************************************************************************/ +void handleTestHDSetTestConfig( MESSAGE_T *message ) +{ + BOOL status = FALSE; + + if ( message->hdr.payloadLen == sizeof( TEST_CONFIG_PAYLOAD_T ) ) + { + TEST_CONFIG_PAYLOAD_T payload; + + memcpy( &payload, message->payload, sizeof( TEST_CONFIG_PAYLOAD_T ) ); + + if ( TRUE == payload.reset ) + { + status = resetTestConfig( (TEST_CONFIG_T)payload.config ); + } + else + { + status = setTestConfig( (TEST_CONFIG_T)payload.config ); + } + } + + // Respond to request + sendTestAckResponseMsg( (MSG_ID_T)message->hdr.msgID, status ); +} + /**@}*/