You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current format of the array in fsw/tables/sch_defsch.c:
SCH_ScheduleEntry_t SCH_DefaultScheduleTable[SCH_TABLE_ENTRIES]
is a one dimensional array slots*entries. It is processed by SCH_ProcessNextSlot as basically a 2D array:
SlotIndex = SCH_AppData.NextSlotNumber * SCH_ENTRIES_PER_SLOT;
NextEntry = &SCH_AppData.ScheduleTable[SlotIndex];
By making a slight change in the definition of the Table - NOT the code, the compiler will be much more helpful in
Discovering issues where not enough or too many entries are defined per slot, causing an action to move into the backwards or forwards to the wrong slot
Increase readability
File can be shorter, because the compiler will set (AFAIK) the undefined entries to 0 anyway
This does not require a change in the code, except for the code generator (which I have some idea's for but not yet done) sch_def_schtbl.c.gz
Reporter Info
Maurice Smulders, Geneva Technologies Inc
The text was updated successfully, but these errors were encountered:
The current format of the array in fsw/tables/sch_defsch.c:
SCH_ScheduleEntry_t SCH_DefaultScheduleTable[SCH_TABLE_ENTRIES]
is a one dimensional array slots*entries. It is processed by SCH_ProcessNextSlot as basically a 2D array:
SlotIndex = SCH_AppData.NextSlotNumber * SCH_ENTRIES_PER_SLOT;
NextEntry = &SCH_AppData.ScheduleTable[SlotIndex];
By making a slight change in the definition of the Table - NOT the code, the compiler will be much more helpful in
This does not require a change in the code, except for the code generator (which I have some idea's for but not yet done)
sch_def_schtbl.c.gz
Reporter Info
Maurice Smulders, Geneva Technologies Inc
The text was updated successfully, but these errors were encountered: