Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -r371355c43e19849e5b1dd27286f62f4424d07ccf -re42bc54b5c3ff134d9f4526034e3c522a64f0cdf --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 371355c43e19849e5b1dd27286f62f4424d07ccf) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision e42bc54b5c3ff134d9f4526034e3c522a64f0cdf) @@ -3758,7 +3758,36 @@ return result; } +/*********************************************************************//** + * @brief + * The handleDGRequestRORejectionRatio function handles the DG request + * to receive the RO rejection ratio from HD institutional record. + * @details Inputs: none + * @details Outputs: none + * @param message a pointer to the message to handle + * @return none + *************************************************************************/ +void handleDGRequestRORejectionRatio( MESSAGE_T* message ) +{ + if ( 0 == message->hdr.payloadLen ) + { + MESSAGE_T msg; + F32 roRejectionRatioInInstitRecord = getRORejectionRatioInInstitRecord(); + + // Create a message record + blankMessage( &msg ); + msg.hdr.msgID = MSG_ID_HD_RO_REJ_RATIO_FROM_HD_INSTIT_RECORD_TO_DG_RESPONSE; + msg.hdr.payloadLen = sizeof( F32 ); + + memcpy( msg.payload, &roRejectionRatioInInstitRecord, sizeof( F32 ) ); + + // 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_DG, ACK_REQUIRED ); + } +} + + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/