Tool/software: Code Composer Studio
Hi,
There is a function arrangeTracksByAge in the MRR demo, which is defined as follows:
void arrangeTracksByAge(KFstate_t * restrict TrackList, const uint32_t numTracksTotal)
{
KFstate_t * currTrackFwd = &TrackList[0];
KFstate_t * currTrackRev = &TrackList[numTracksTotal-1];
KFstate_t temp;
uint32_t numTracks = numTracksTotal;
uint32_t i, j;
/* For each track, assign the newer tracks to the bottom of the list. Copy the older tracks
* to the beginning. */
for (i = 0; i < numTracksTotal; i++)
{
if ((currTrackFwd->validity == IS_VALID) && (currTrackFwd->tick < 10))
{
for (j = 0; j < numTracks-(i+1); j++)
{
if ((currTrackRev->tick >= 10) && (currTrackFwd->validity == IS_VALID))
{...}
...
}
....
}
}
There is two judgments marked as red as above and they are identical, I think the second one should be modified as currTrackRev->validity == IS_VALID. It is more reasonable. I don't know whether my speculation is right.
Thanks,
Regards,
Rata