Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r660876bca7ae34f862ae9cc6feef9a30ec02fe94 -r03bd494bf7b7c96f79cf9b8bd0f99432982b9571 --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 660876bca7ae34f862ae9cc6feef9a30ec02fe94) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 03bd494bf7b7c96f79cf9b8bd0f99432982b9571) @@ -94,7 +94,6 @@ U32 serializeMessage( MESSAGE_T msg, COMM_BUFFER_T buffer, BOOL ackReq ) { BOOL result = 0; - BOOL error = FALSE; BOOL blocked = FALSE; U32 msgSize = 0; U32 sizeMod, sizePad; @@ -167,17 +166,13 @@ { if ( FALSE == addMsgToPendingACKList( &msg, buffer, data, msgSize ) ) { - error = TRUE; - SET_ALARM_WITH_1_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_MSG_PENDING_ACK_LIST_FULL ) + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_MSG_PENDING_ACK_LIST_FULL, (U32)(msg.hdr.msgID) ) } } } - if ( FALSE == error ) - { - // Add serialized message data to appropriate out-going comm buffer - result = addToCommBuffer( buffer, data, msgSize ); - } + // Add serialized message data to appropriate out-going comm buffer + result = addToCommBuffer( buffer, data, msgSize ); } else { @@ -3117,6 +3112,30 @@ /*********************************************************************//** * @brief + * The sendFWVersionRequest function constructs a firmware version request + * message and queues the msg for transmit on the appropriate CAN channel. + * @details Inputs: none + * @details Outputs: Firmware version request msg constructed and queued. + * @return TRUE if msg successfully queued for transmit, FALSE if not + *************************************************************************/ +BOOL sendFWVersionRequest( void ) +{ + BOOL result; + MESSAGE_T msg; + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_REQUEST_FW_VERSIONS; + msg.hdr.payloadLen = sizeof( UI_VERSIONS_T ); // usually UI sends this request w/ UI version info - we will leave that blank + + // Serialize the message (w/ sync, CRC, and appropriate CAN padding) and add serialized message data to appropriate comm buffer + result = serializeMessage( msg, COMM_BUFFER_OUT_CAN_HD_2_DG, ACK_REQUIRED ); + + return result; +} + +/*********************************************************************//** + * @brief * The handleUIVersionResponse function handles a response to request for * UI version information. * @details Inputs: none