Quote:
Originally Posted by dcb
at some point during the long test, the trip mph dropped to 8.5mph instead of 20mph, probably overflowing, instant is fine.
|
I checked your numbers and program code.
In the mph() routine, there is one, (vssPulses*3600).
You saw 2,148,300 (vssPulses), then vssPulses*3600=7,733,880,000, which is 0x1CCF9A4C0 in hex. It becomes more than 32bit, or more than the unsigned long range.
Yoshi