Programming Languages
Bug Report
Arduino controller stops after 49.7 days: millis() overflow in interval checks
Our dosing controllers ran for weeks, then locked themselves out on day 49. The interval check compared now >= lastRun + interval, which breaks when the sum wraps past 2^32 milliseconds. How we proved it with a simulated clock and fixed it with unsigned subtraction.