Skip to content

Commit

Permalink
Fix nasa#10, Rename MM_ResetHk to MM_ResetHkData to improve clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Jan 17, 2024
1 parent 5b5724d commit 215b887
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions fsw/src/mm_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ CFE_Status_t MM_AppInit(void)
/*
** Initialize MM housekeeping information
*/
MM_ResetHk();
MM_ResetHkData();

/*
** Application startup event message
Expand Down Expand Up @@ -251,7 +251,7 @@ void MM_AppPipe(const CFE_SB_Buffer_t *BufPtr)
** MM ground commands
*/
case MM_CMD_MID:
MM_ResetHk(); /* Clear all "Last Action" data */
MM_ResetHkData(); /* Clear all "Last Action" data */

CFE_MSG_GetFcnCode(&BufPtr->Msg, &CommandCode);
switch (CommandCode)
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/mm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ extern MM_AppData_t MM_AppData;
/* Reset the local housekeeping variables to default parameters */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void MM_ResetHk(void)
void MM_ResetHkData(void)
{
MM_AppData.HkPacket.Payload.LastAction = MM_NOACTION;
MM_AppData.HkPacket.Payload.MemType = MM_NOMEMTYPE;
Expand Down
2 changes: 1 addition & 1 deletion fsw/src/mm_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* This function does not zero the command execution counter
* or the command error counter
*/
void MM_ResetHk(void);
void MM_ResetHkData(void);

/**
* \brief Segment break
Expand Down
6 changes: 3 additions & 3 deletions unit-test/mm_utils_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ uint8 call_count_CFE_EVS_SendEvent;
* Function Definitions
*/

void MM_ResetHk_Test(void)
void MM_ResetHkData_Test(void)
{
MM_AppData.HkPacket.Payload.LastAction = 1;
MM_AppData.HkPacket.Payload.MemType = 2;
Expand All @@ -64,7 +64,7 @@ void MM_ResetHk_Test(void)
MM_AppData.HkPacket.Payload.FileName[0] = 6;

/* Execute the function being tested */
MM_ResetHk();
MM_ResetHkData();

/* Verify results */
UtAssert_True(MM_AppData.HkPacket.Payload.LastAction == MM_NOACTION, "MM_AppData.HkPacket.Payload.LastAction == MM_NOACTION");
Expand Down Expand Up @@ -3571,7 +3571,7 @@ void MM_ComputeCRCFromFile_Test(void)
*/
void UtTest_Setup(void)
{
UtTest_Add(MM_ResetHk_Test, MM_Test_Setup, MM_Test_TearDown, "MM_ResetHk_Test");
UtTest_Add(MM_ResetHkData_Test, MM_Test_Setup, MM_Test_TearDown, "MM_ResetHkData_Test");
UtTest_Add(MM_VerifyCmdLength_Test_Nominal, MM_Test_Setup, MM_Test_TearDown, "MM_VerifyCmdLength_Test_Nominal");
UtTest_Add(MM_VerifyCmdLength_Test_HKRequestLengthError, MM_Test_Setup, MM_Test_TearDown,
"MM_VerifyCmdLength_Test_HKRequestLengthError");
Expand Down
4 changes: 2 additions & 2 deletions unit-test/stubs/mm_utils_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
#include "utassert.h"
#include "utstubs.h"

void MM_ResetHk(void)
void MM_ResetHkData(void)
{
UT_DEFAULT_IMPL(MM_ResetHk);
UT_DEFAULT_IMPL(MM_ResetHkData);
}

void MM_SegmentBreak(void)
Expand Down

0 comments on commit 215b887

Please sign in to comment.