Skip to content

Commit df7401f

Browse files
authored
Merge pull request #52 from thnkslprpt/fix-8-remove-unnecessary-characters-in-dump-event
Fix #8, Remove unnecessary characters from memory dump event
2 parents da7ef70 + e948cdd commit df7401f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fsw/src/mm_dump.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ bool MM_DumpInEventCmd(const CFE_SB_Buffer_t *BufPtr)
535535
BytePtr = (uint8 *)DumpBuffer;
536536
for (i = 0; i < CmdPtr->NumOfBytes; i++)
537537
{
538-
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "0x%02X ", *BytePtr);
538+
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "%02X ", *BytePtr);
539539
CFE_SB_MessageStringGet(&EventString[EventStringTotalLength], TempString, NULL,
540540
sizeof(EventString) - EventStringTotalLength, sizeof(TempString));
541541
EventStringTotalLength = strlen(EventString);

fsw/src/mm_dump.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@
4444
*
4545
* The event message format is:
4646
* Message head "Memory Dump: " 13 characters
47-
* Message body "0xFF " 5 characters per dump byte
47+
* Message body "FF" 2 characters per dump byte
4848
* Message tail "from address: 0xFFFFFFFF" 33 characters including NUL on 64-bit system
4949
*/
50-
#define MM_MAX_DUMP_INEVENT_BYTES ((CFE_MISSION_EVS_MAX_MESSAGE_LENGTH - (13 + 33)) / 5)
50+
#define MM_MAX_DUMP_INEVENT_BYTES ((CFE_MISSION_EVS_MAX_MESSAGE_LENGTH - (13 + 33)) / 2)
5151

5252
/**
5353
* \brief Dump in an event scratch string size

0 commit comments

Comments
 (0)