Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with functions scheduled from scheduled functions #6770

merged 2 commits into from Nov 14, 2019


Copy link

dok-net commented Nov 13, 2019

Fixes #6764

Here's my take - unknowingly working in parallel to @d-a-v - on the same issue #6764.
Copy and pasted, then adapted, the code from run_scheduled_recurrent_functions

Also, extended the MCVE to end re-scheduling at one point, in order to show that the end condition still works:

#include "Arduino.h"
#include "Schedule.h"

void cp()
	static int c = 0;
	if ((c++ % 10000) == 0) Serial.printf(".");
	if (c < 100000) schedule_function(cp);

void setup()

void loop()
	static int l = 0;
	if ((l++ % 10000) == 0) Serial.printf(":");

The result:

dok-net and others added 2 commits Nov 13, 2019
@devyte devyte added this to the 2.6.1 milestone Nov 14, 2019
@devyte devyte changed the title Fixes #6764 Fix issue with functions scheduled from scheduled functions Nov 14, 2019
@devyte devyte merged commit 6f3c57b into esp8266:master Nov 14, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
@dok-net dok-net deleted the dok-net:recursivescheduling branch Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.