Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -rc52bfbc3f41fecde11bbec3eb71dc812154fc760 -rfc12876da6930c955864352182aee2076513a1cc --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision c52bfbc3f41fecde11bbec3eb71dc812154fc760) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision fc12876da6930c955864352182aee2076513a1cc) @@ -22,6 +22,7 @@ #include "Accel.h" #include "AlarmLamp.h" #include "Buttons.h" +#include "Compatible.h" #include "ConsumableSelfTest.h" #include "FPGA.h" #include "ModeStandby.h" @@ -2599,8 +2600,7 @@ BOOL passed; memcpy( &passed, payloadPtr, sizeof( BOOL ) ); - - // TODO - handle DG POST final result + signalDGPOSTFinalResult( passed ); } else { @@ -3463,16 +3463,24 @@ void handleFWVersionRequest( MESSAGE_T *message ) { MESSAGE_T msg; - HD_VERSIONS_T payload; // TODO - add compatibility data to response + HD_VERSIONS_T payload; U08 *payloadPtr = msg.payload; - // TODO - grab UI version data when UI includes it in this message + // Get UI version data from this request msg and have it recorded + if ( sizeof(UI_VERSIONS_T) == message->hdr.payloadLen ) + { + UI_VERSIONS_T uiVersion; + memcpy( &uiVersion, &message->payload[0], sizeof(UI_VERSIONS_T) ); + signalUIVersion( uiVersion ); + } + // Populate payload payload.major = (U08)HD_VERSION_MAJOR; payload.minor = (U08)HD_VERSION_MINOR; payload.micro = (U08)HD_VERSION_MICRO; payload.build = (U16)HD_VERSION_BUILD; + payload.compatibilityRev = (U32)SW_COMPATIBILITY_REV; getFPGAVersions( &payload.fpgaId, &payload.fpgaMajor, &payload.fpgaMinor, &payload.fpgaLab ); // Create a message record @@ -3485,9 +3493,29 @@ // 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 ); -} +} + +/*********************************************************************//** + * @brief + * The handleDGVersionResponse function handles a response for DG f/w version. + * @details Inputs: none + * @details Outputs: message handled, DG version info recorded. + * @param message a pointer to the message to handle. + * @return none + *************************************************************************/ +void handleDGVersionResponse( MESSAGE_T *message ) +{ + // Get DG version data from this response msg and have it recorded + if ( sizeof(DG_VERSIONS_T) == message->hdr.payloadLen ) + { + DG_VERSIONS_T dgVersion; + + memcpy( &dgVersion, &message->payload[0], sizeof(DG_VERSIONS_T) ); + signalDGVersion( dgVersion ); + } +} + - /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/