Circular Buffer For Handling Rapid Particle Events

How exactly are you using it?
I don't think it's an issue of strcmp() but how it's used.

Without going through the complete thread, I'd think you need a local list of all arleady found IDs with their latest timestamp and iterate over the whole list for each "newly" reported ID and compare them first, if you found the same ID compare the current time with the stored latest, if the difference is greater than your threshold, update the timestamp and report the new time, otherwise break out of the loop.
If you have reached the end of the list without finding the ID, add the ID to the list with the current timestamp, report time and move on to the next "newly" reported ID.
rinse - repeat

2 Likes