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

Clarify schedule table guidance #44

Closed
fletching opened this issue Jul 21, 2020 · 1 comment · Fixed by #45 or #48
Closed

Clarify schedule table guidance #44

fletching opened this issue Jul 21, 2020 · 1 comment · Fixed by #45 or #48
Labels
bug Something isn't working docs
Milestone

Comments

@fletching
Copy link

sch_lab_table.c has some guidance for creating the scheduling table, including "Make sure the table is terminated by the SCH_LAB_END_OF_TABLE entry". But In looking at the file history, it doesn't look like the default schedule table has included a SCH_LAB_END_OF_TABLE entry ever in the past year, which is as far back as that file history goes. Should that guidance be removed?

@skliper
Copy link
Contributor

skliper commented Jul 23, 2020

The loop is below, and skips entries with a PacketRate == 0. No longer need to terminate the table with SCH_LAB_END_OF_TABLE.

for (i = 0; i < SCH_LAB_MAX_SCHEDULE_ENTRIES; i++)
{
if (LocalStateEntry->PacketRate != 0)
{
++LocalStateEntry->Counter;
if (LocalStateEntry->Counter >= LocalStateEntry->PacketRate)
{
LocalStateEntry->Counter = 0;
CFE_SB_SendMsg(&LocalStateEntry->MsgBuf.MsgHdr);
}
}
++LocalStateEntry;
}

I'll submit a PR.

skliper added a commit to skliper/sch_lab that referenced this issue Jul 23, 2020
@skliper skliper added the enhancement New feature or request label Jul 23, 2020
astrogeco added a commit that referenced this issue Aug 5, 2020
@astrogeco astrogeco added this to the 2.4.0 milestone Oct 1, 2020
@astrogeco astrogeco added bug Something isn't working docs and removed enhancement New feature or request labels Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docs
Projects
None yet
3 participants