Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #8, Remove unnecessary characters from memory dump event #79

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fsw/src/mm_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ bool MM_DumpInEventCmd(const CFE_SB_Buffer_t *BufPtr)
BytePtr = (uint8 *)DumpBuffer;
for (i = 0; i < CmdPtr->NumOfBytes; i++)
{
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "0x%02X ", *BytePtr);
snprintf(TempString, MM_DUMPINEVENT_TEMP_CHARS, "%02X ", *BytePtr);
CFE_SB_MessageStringGet(&EventString[EventStringTotalLength], TempString, NULL,
sizeof(EventString) - EventStringTotalLength, sizeof(TempString));
EventStringTotalLength = strlen(EventString);
Expand Down
4 changes: 2 additions & 2 deletions fsw/src/mm_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
*
* The event message format is:
* Message head "Memory Dump: " 13 characters
* Message body "0xFF " 5 characters per dump byte
* Message body "FF" 2 characters per dump byte
* Message tail "from address: 0xFFFFFFFF" 33 characters including NUL on 64-bit system
*/
#define MM_MAX_DUMP_INEVENT_BYTES ((CFE_MISSION_EVS_MAX_MESSAGE_LENGTH - (13 + 33)) / 5)
#define MM_MAX_DUMP_INEVENT_BYTES ((CFE_MISSION_EVS_MAX_MESSAGE_LENGTH - (13 + 33)) / 2)

/**
* \brief Dump in an event scratch string size
Expand Down