Skip to content
Open
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
33 changes: 6 additions & 27 deletions fsw/src/lc_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,16 @@
void LC_SampleAPs(uint16 StartIndex, uint16 EndIndex)
{
uint16 TableIndex;
uint8 CurrentAPState;

/*
** Make sure the current state of the starting actionpoint
** in the sample is valid for a sample request
*/
CurrentAPState = LC_OperData.ARTPtr[StartIndex].CurrentState;

if ((CurrentAPState != LC_ACTION_NOT_USED) && (CurrentAPState != LC_APSTATE_PERMOFF))
** Sample selected actionpoints.
** LC_SampleSingleAP handles per-AP state checks internally,
** so no pre-check on the start index is needed.
*/
for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++)
{
/*
** Sample selected actionpoints
*/
for (TableIndex = StartIndex; TableIndex <= EndIndex; TableIndex++)
{
LC_SampleSingleAP(TableIndex);
}
LC_SampleSingleAP(TableIndex);
}
else
{
/*
** Actionpoint isn't currently operational
*/
CFE_EVS_SendEvent(LC_APSAMPLE_CURR_ERR_EID,
CFE_EVS_EventType_ERROR,
"Sample AP error, invalid current AP state: AP = %d, State = %d",
StartIndex,
CurrentAPState);
}

return;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Expand Down
Loading