In the process of pulling out a bit more of a representative section of the code, I noticed that the scope of my "detectionData" array had been moved out of the "loop" function and was global.
I've moved this back inside just the loop function (that's the only place it's used, so no need for it to be global.
This has resolved my issue.
Not entirely sure why it was causing the behaviour described in my initial post, however it has solved my issue.
@nathangoss are you starting to see why it's important to show your complete code or (better yet, a small, complete MRE that demonstrates the problem)?
Doing so really cuts down on the amount of unnecessary clutter traffic in your thread.
Imma guess that both @alto777 and @gcjr have done more with C than C++, more closer to the metal so to speak than at high remove from the actual machinery.
I see the point of C++, and I don't mind languages with build in features that are abstractions.
What kills me is the potential for abuse. One could literally make a new kind of integer and overload all the operators, so '+' would divide, '*' would subtract, '==' would test for greater than, and so forth.
Since those things are up to any individual, it can make reading code hard. One would have to poke around in the programmer's implementation or documnets, if s/he even bothered, as opposed to features in rich languages that "everyone" knows, that are 'splained in a slew of textbooks and so forth.
Like the standard template library. I think. Prolly gonna die knowing even less about it than I do this day.
There are a few things I'd like to do that I am certain C++ would cut like a blowtorch to butter, so
THX @gfvalvo, for dragging me one step closer to… the edge.
yes, my experience is this low-level real-time code and haven't had much need to implement nor review higher level capabilities of C++ and am therefore not familiar with them
it's ironic that i'm trying to simulate some code the uses the feature being discussed. this is for accessing private elements in an array for class IPAddress.