Index: firmware/App/Services/SystemCommMessages.c =================================================================== diff -u -ra1a0187daedaf2c12e6f9eccfbf9e423d952e029 -r41b10a6abfff3c6e2cbef765ed5ddc762a19899c --- firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision a1a0187daedaf2c12e6f9eccfbf9e423d952e029) +++ firmware/App/Services/SystemCommMessages.c (.../SystemCommMessages.c) (revision 41b10a6abfff3c6e2cbef765ed5ddc762a19899c) @@ -3440,16 +3440,18 @@ void handleHDUsageInfoRequest( MESSAGE_T *message ) { MESSAGE_T msg; - U32 payload = 0; // TODO update this one implemented + HD_USAGE_INFO_RECORD_T usageRecord; U08 *payloadPtr = msg.payload; + getNVRecord2Driver( GET_USAGE_RECORD, (U08*)&usageRecord, sizeof( HD_USAGE_INFO_RECORD_T ), 0, ALARM_ID_NO_ALARM ); + // Create a message record blankMessage( &msg ); - msg.hdr.msgID = MSG_ID_HD_USAGE_DATA; - msg.hdr.payloadLen = sizeof( U32 ); + msg.hdr.msgID = MSG_ID_HD_USAGE_DATA; + msg.hdr.payloadLen = sizeof( HD_USAGE_INFO_RECORD_T ); // Fill message payload - memcpy( payloadPtr, &payload, sizeof( U32 ) ); + memcpy( payloadPtr, &usageRecord, sizeof( HD_USAGE_INFO_RECORD_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 );