-
Notifications
You must be signed in to change notification settings - Fork 251
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
Add a default constructor to the Task class #65
Comments
It shoud already be possible to instantiate Task() without any parameters. No change is required for that. No .CPP file is unfortunately the only way to make compilation parameters like _TASK_STATUS_REQUEST and others work with Arduino IDE. |
Thanks for your answer. It was not possible if compiled with _TASK_STATUS_REQUEST Accordingly, I forked your lib and modified both existing constructors:
For the .CPP and conflict with Arduino IDE, I didn't know. Thanks;) |
Oh, that's a bug then. Thanks for letting me know. Will fix! |
Unfortunately, your solution changed the Task constructor signature and would make TS backwards-incompatible. Will push into |
Hi,
It might be a good idea to add an explicit default constructor to the Task class.
Line 128 of TaskSchedulerDeclarations.h, add:
INLINE Task() {};
This would allow to compile libraries such as painlessMesh (which declare a bunch of Tasks without initializing them) together with option _TASK_STATUS_REQUEST.
Another question: why not use the classical header (.h) and code (.cpp) file structure instead of two .h files with different names?
The text was updated successfully, but these errors were encountered: