Skip to content

Firmware, GPAD_API, Rev 0.58, millis() Wrap May Cause Malfunction After Almost 50 Days, Many instances. #555

@ForrestErickson

Description

@ForrestErickson

Describe the bug
A clear and concise description of what the bug is.

Short Summary of the expected behavior:
Every periodic function should be reliable.

Short Summary of the buggy behavior:
Function of the form

if (millis() - timer <= delayPlayLevel)
{
return false;
}
timer = millis();

May malfunction when millis() wraps after about 50 days.

Exposer to this problem

Add any other context about the problem here.

There are 44 instances of millis() in our code. Not all of which are in a conditional test but every one that is needs a gard on the millis() wrap.

Image

Details on a guard example

From an AI

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions