Skip to content

Commit 3746982

Browse files
committed
Fix nasa#8, Remove unnecessary characters from memory dump event
1 parent b824250 commit 3746982

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
@@ -526,7 +526,7 @@ bool MM_DumpInEventCmd(const CFE_SB_Buffer_t *BufPtr)
526526
BytePtr = (uint8 *)DumpBuffer;
527527
for (i = 0; i < CmdPtr->NumOfBytes; i++)
528528
{
529-
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "0x%02X ", *BytePtr);
529+
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "%02X", *BytePtr);
530530
strncat(EventString, TempString, MM_DUMPINEVENT_TEMP_CHARS);
531531
BytePtr++;
532532
}

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)