Quote:
Originally Posted by virtuald
Ah yes, here we go. I think I'm misreading everybody's comments tonight...
|
Yep, that's the one!
I have to agree with Oblarg that the failure to clear the accumulated buffer sum is a big problem. That's a flaw in the plan of never actually re-calculating the sum of the buffered entries - it's easy to introduce a bug like this when you forget to zero out the total when you empty the buffer.
m_bufTotal should be set to 0 in setSetpoint right after doing the m_buf.clear();