Skip to content

DMtimer seems to block after some time - Long overflow ? #1

@Koraze

Description

@Koraze

Hi, sorry for my bad english.

I build an ESP8266 (NodeMCU) robot and it seems your lib blocks the robot after some hours. I think it is because of long overflow inside your code. After some time the "currentTimer" turns back to 0 making this condition "if(currentTime > _lastTime + interval)" not working anymore. So I suggest you to make this small fix :

Remplace if(currentTime > _lastTime + interval)
by if(currentTime - _lastTime > interval)

Because it's my first time on github. I don't really know how to propose this fix in another way.
I'm testing this new fix right now. If I don't go back, it's because it seems to work ;)

Thanks for your lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions