
Originally Posted by
vamfun
Ok, great to see your changes. Can you explain what this statement is doing from the Counter::GetPeriod()
period = (double)output.Period / (double)output.Count
I see that you set the period to infinity if stalled, but what about a call that is made to the getPeriod() before it has stalled and we have no recorded pulses yet. As an example.. suppose the maxperiod is set to 20 seconds, the encoder is physically stalled but timer has yet to stall. What will the getPeriod return at 10 seconds? It would seem that we should initialize the "is stalled" flag to a stalled condition if this isn't already the case.