Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r13a064292b5a36a85593f53eabae268ae2bf4bc6 -r8639aa012127798aeb8fd719dd7f93b83275f944 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 13a064292b5a36a85593f53eabae268ae2bf4bc6) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 8639aa012127798aeb8fd719dd7f93b83275f944) @@ -33,8 +33,9 @@ #include "OperationModes.h" #include "Reservoirs.h" #include "RTC.h" -#include "SampleWater.h" #include "SafetyShutdown.h" +#include "SalineBolus.h" +#include "SampleWater.h" #include "SystemComm.h" #include "SystemCommMessages.h" #include "Temperatures.h" @@ -3488,8 +3489,7 @@ payloadPtr += sizeof(U32); memcpy( &status, payloadPtr, sizeof(U32) ); - if ( ( CONFIRMATION_REQUEST_STATUS_REJECTED == status ) || - ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) ) + if ( ( CONFIRMATION_REQUEST_STATUS_REJECTED == status ) || ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == status ) ) { setConfirmationRequestStatus( (GENERIC_CONFIRM_ID_T)request_id, (CONFIRMATION_REQUEST_STATUS_T)status ); } @@ -3503,29 +3503,21 @@ * The sendConfirmationRequest function sends a confirmation request to UI * @details Inputs: none * @details Outputs: none - * @param requestID ID of confirmation being requested - * @param requestType Type of confirmation being requested - * @param rejectReason Reason Reason for reject if type is reject + * @param request ID pointer to generic message request structure * @return none *************************************************************************/ -void sendConfirmationRequest( GENERIC_CONFIRM_ID_T requestID, GENERIC_CONFIRM_COMMAND_T requestType, U32 rejectReason ) +void sendConfirmationRequest( GENERIC_CONFIRMATION_REQUEST_T *request ) { MESSAGE_T msg; U08 *payloadPtr = msg.payload; - U32 temp_request = requestID; // Create a message record blankMessage( &msg ); msg.hdr.msgID = MSG_ID_HD_UI_CONFIRMATION_REQUEST; // The payload length is U32 Request ID, U32 Type, U32 Reject Reason - msg.hdr.payloadLen = 3 * sizeof( U32 ); + msg.hdr.payloadLen = sizeof( GENERIC_CONFIRMATION_REQUEST_T ); - memcpy( payloadPtr, &temp_request, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - temp_request = requestType; - memcpy( payloadPtr, &temp_request, sizeof( U32 ) ); - payloadPtr += sizeof( U32 ); - memcpy( payloadPtr, &rejectReason, sizeof( U32 ) ); + memcpy( payloadPtr, request, sizeof( GENERIC_CONFIRMATION_REQUEST_T ) ); // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_UI, ACK_REQUIRED );