Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -re3839e10decfadf12a8fb2b9f8c049d8a30e945b -ra6f54c63d4484f0e71bd27eca7e804f997ab5999 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision e3839e10decfadf12a8fb2b9f8c049d8a30e945b) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a6f54c63d4484f0e71bd27eca7e804f997ab5999) @@ -99,7 +99,7 @@ static BOOL sendTestAckResponseMsg( MSG_ID_T msgID, BOOL ack ); static BOOL sendAckResponseMsg( MSG_ID_T msgID, COMM_BUFFER_T buffer, BOOL ack ); -static BOOL sendUIResponseMsg( MSG_ID_T msgID, BOOL accepted, U32 reason ); +static BOOL sendUIResponseMsg( MSG_ID_T msgID, UI_RESPONSE_PAYLOAD_T *uiResponse ); /*********************************************************************//** * @brief @@ -247,18 +247,18 @@ * @details Inputs: none * @details Outputs: response message constructed and queued for transmit. * @param msgID ID of handled message that we are responding to - * @param accepted T/F - request accepted? - * @param reason reason code if rejected + * @param ui response pointer to the UI response payload * @return TRUE if response message successfully queued for transmit, FALSE if not *************************************************************************/ -static BOOL sendUIResponseMsg( MSG_ID_T msgID, BOOL accepted, U32 reason ) +static BOOL sendUIResponseMsg( MSG_ID_T msgID, UI_RESPONSE_PAYLOAD_T *uiResponse ) { BOOL result; MESSAGE_T msg; UI_RESPONSE_PAYLOAD_T cmd; - cmd.accepted = accepted; - cmd.rejectionReason = reason; + cmd.fwValue = uiResponse->fwValue; + cmd.accepted = uiResponse->accepted; + cmd.rejectionReason = uiResponse->rejectionReason; // Create a message record blankMessage( &msg ); @@ -1775,13 +1775,13 @@ *************************************************************************/ void handleSetROOnlyMode( MESSAGE_T* message ) { + BOOL result; + UI_RESPONSE_PAYLOAD_T uiResponse; REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_DG_RO_ONLY_MODE_INVALID_PAYLOAD_LENGTH; BOOL accepted = FALSE; if ( message->hdr.payloadLen == sizeof(U32) ) { - BOOL result; - rejReason = REQUEST_REJECT_REASON_NONE; memcpy( &result, message->payload, sizeof(BOOL) ); @@ -1810,7 +1810,11 @@ } } - sendUIResponseMsg( MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE, accepted, rejReason ); + uiResponse.fwValue = (U32)result; + uiResponse.accepted = accepted; + uiResponse.rejectionReason = rejReason; + + sendUIResponseMsg( MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE, &uiResponse ); } /*********************************************************************//** @@ -4959,8 +4963,9 @@ *************************************************************************/ void handleDGROStatusRequest( MESSAGE_T* message ) { + UI_RESPONSE_PAYLOAD_T uiResponse; REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NONE; - BOOL roMode = FALSE; + BOOL roMode = FALSE; if ( 0 == message->hdr.payloadLen ) { @@ -4970,7 +4975,12 @@ { rejReason = REQUEST_REJECT_REASON_DG_RO_ONLY_MODE_INVALID_PAYLOAD_LENGTH; } - sendUIResponseMsg( MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE, roMode, rejReason ); + + uiResponse.fwValue = (U32)roMode; + uiResponse.accepted = roMode; + uiResponse.rejectionReason = rejReason; + + sendUIResponseMsg( MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE, &uiResponse ); } /*********************************************************************//**