aboutsummaryrefslogtreecommitdiff
path: root/examples/Scheduler_example4_StatusRequest
diff options
context:
space:
mode:
authorAnatoli Arkhipenko <arkhipenko@hotmail.com>2015-11-14 17:46:16 -0500
committerAnatoli Arkhipenko <arkhipenko@hotmail.com>2015-11-14 17:46:16 -0500
commitdc152db48e325a5d03be0d48a07c119d97d11e59 (patch)
tree72fdcd4c9feee8da743e9540ce58580e7392a7d9 /examples/Scheduler_example4_StatusRequest
parentef2329bdeade723f560cd0f7e933c9f3119677f3 (diff)
Version 1.8.3 number of addtions and improvementsv1.8.3
* support for task activation on a status request with arbitrary interval and number of iterations (0 and 1 are still default values) * implement waitForDelayed() method to allow task activation on the status request completion delayed for one current interval * added callback methods prototypes to all examples for Arduino IDE 1.6.6 compatibility * added several constants to be used as task parameters for readability (e.g, TASK_FOREVER, TASK_SECOND, etc.) * significant optimization of the scheduler's execute loop, including millis() rollover fix option
Diffstat (limited to 'examples/Scheduler_example4_StatusRequest')
-rw-r--r--examples/Scheduler_example4_StatusRequest/Scheduler_example4_StatusRequest.ino12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/Scheduler_example4_StatusRequest/Scheduler_example4_StatusRequest.ino b/examples/Scheduler_example4_StatusRequest/Scheduler_example4_StatusRequest.ino
index 080de05..22f1dbc 100644
--- a/examples/Scheduler_example4_StatusRequest/Scheduler_example4_StatusRequest.ino
+++ b/examples/Scheduler_example4_StatusRequest/Scheduler_example4_StatusRequest.ino
@@ -13,7 +13,15 @@ StatusRequest st;
Scheduler ts;
-Task t1(5000, 1, &Callback1, &ts, true, NULL, &Disable1);
+// Callback methods prototypes
+void Callback1();
+void Disable1();
+void Callback2();
+void Callback3();
+void PrepareStatus();
+
+// Tasks
+Task t1(5000, TASK_ONCE, &Callback1, &ts, true, NULL, &Disable1);
Task t2(&Callback2, &ts);
Task t3(&Callback3, &ts);
@@ -77,4 +85,4 @@ void loop() {
ts.execute();
-}
+} \ No newline at end of file